-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 theal wrote: > I need to change the shell on 25+ users from /bin/false to /bin/passwd > > what is the best way to do this? Can I simply do a search and replace > while editing /etc/passwd?
Technically, that's probably not the Right Way, but so long as nothing else is writing to /etc/passwd at the same time, it ought to be fine :-) The Right Way is something like this: for a in `grep '/bin/false' /etc/passwd| cut -f 1 -d ':'`; do usermod -s /bin/passwd $a; done (completely untested) Dave. - -- Dave Ewart - [EMAIL PROTECTED] - jabber: [EMAIL PROTECTED] All email from me is now digitally signed, key from http://www.sungate.co.uk/ Fingerprint: AEC5 9360 0A35 7F66 66E9 82E4 9E10 6769 CD28 DA92 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFDDg8lnhBnac0o2pIRAgQ5AJ9nG8snsTEzjdAjTHDO6rpXkhHg4gCcCzZD koS+LPNp28yqx5474OnwCPw= =jmdC -----END PGP SIGNATURE----- -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]