>> Hi >> >> I am a beginner in perl and have tough time in writing a script which >> i need urgently. I would like to know the perl script to >> 1)modify passswords in LDAP for multiple users taking input from >> another file(which contains usernames and new passwords ) >> Thank you in advance. > >> --
Oooops One to many passwords, try system("cpu usermod --password=$password $user"); instead Owen > > You need a statement something like this > > system("cpu usermod --password=$password $password"); > > For multiple users, you need to > > 1. Open the file with the users names/password > 2. Read that file > 3. loop through the above command > > > So I will let you tidy this up > > open (my $USERS,"<", "/file/of/users-password") or die ......; > while (<$USERS>){ > chomp; > my ($user, $password) = split; #(I guess) > system("cpu usermod --password=$password $password"); > } > > > > owen > > > > > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > http://learn.perl.org/ > > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/