change password in one go
Hi all,
I need to change the password of any user in one go. For example in Linux we have two options :- Code:
(echo "username:password") | chpasswd I have made it for Linux but now I require it to run on other Unix boxes also. I dont have option to install any other utility like expect. :cry: Pls can someone give Solaris equivalent of the command. Thanks in adv. VIKAS |
http://www.ussg.iu.edu/usail/man/solaris/passwd.1.html
In files case, super-users (for instance, real and effective uid equal to zero, see id(1M) and su(1M)) may change any password; hence, passwd does not prompt privileged users for the old password. Privileged users are not forced to comply with password aging and password construction requirements. A privileged user can create a null password by entering a carriage return in response to the prompt for a new pass- word. (This differs from passwd -d because the "password" prompt will still be displayed.) http://www.informit.com/articles/art...26523&seqNum=6 Root and Password Changes The root user is permitted to change the password for any user. When root changes a user's password, the passwd command does not prompt for the old password. This permits root to "reset" a user's password in circumstances when the user has forgotten his or her password. This also permits root to lock a user's account by changing the user's password to a value that the user is unlikely to guess. |
Use a network based user/password management like NIS or LDAP and you are set.
See also: http://www.linuxquestions.org/questi...prompt-646675/ |
From:
http://www.fantasticunix.com/forum/g...assword-2.html This seems to be a little difficult because of the lack of useradd |
Check out the perl script on this page:
http://aa11.cjb.net/sun_managers/1998/10/msg00411.html Also, see: http://www.softpanorama.org/Utilities/chpasswd.shtml |
I've merged similar threads. vikas027, please avoid posting the same question in multiple threads.
|
Well, I can kinda understand...they are posted to different forums (solaris, hp-ux, aix)...people might ignore one and comment on another based on their knowledge/experience...covering bases...if he posted to a single, more general forum, poweruses with the respective OSs might bypass it altogether. Very similar, true, but wasn't a "bad faith" of multi-posting, I don't think (reasonable explanation exists).
|
Quote:
still, will take care in future. |
If you have not found a solution yet, consider posting to justlinux.com
|
If you have not found a solution yet, consider posting to justlinux.com
Also, I would guess that there are dedicated solaris, hp-ux, and aix help sites/forums |
Thanks ehawk, will post there too.
|
All times are GMT -5. The time now is 02:52 PM. |