[Samba] Smbpasswd without prompt?
Tiago Cruz
tiagocruz18 at uol.com.br
Mon Mar 17 19:30:36 GMT 2003
Xi....
I forget the script :-(
===========================================================
#!/usr/bin/perl
$file = "king.txt";
if ( -e $file ) {
open(arq, $file) or die "Não foi possivel abrir o arquivo";
@linhas = <arq>;
close(arq);
$i=0;
while (@linhas[$i]) {
($login, $nome, $depto) = split(/\|/, @linhas[$i]);
system "/usr/sbin/useradd -p $passwd $login -g $depto";
system "/usr/bin/smbpasswd -a $login $passwd";
sleep(1);
$i++;
}
}3
==================================================
Thanks again!!!
Tiago Cruz
Em Seg, 2003-03-17 às 16:17, Tiago Cruz escreveu:
> Hello again! :-)
>
> Mine he doubts he is with relation to smbpasswd, would like to add to an
> user and a password standard from one script (*in botton), but I did not
> obtain to eliminate prompt requesting the new password and password
> verification, like make in useradd.
>
> This is possible? I use Red Hat 8.0 box with a Samba 3.0 Alpha running a
> PDC.
>
> Me he seems that alone it functions compiling with support the LDAP,
> correct? I Installed with a simple RPM package :-)
>
> Very Thanks in advance
>
> Regards
>
> Tiago Cruz
> Org. King de Contab. S/C Ltda.
> Linux User #282636
[ ]'s
Tiago Cruz
Org. King de Contab. S/C Ltda.
www.linuxrapido.kit.net
Linux User #282636
More information about the samba
mailing list