-----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.