Operating System - HP-UX
1753657 Members
5778 Online
108798 Solutions
New Discussion

Re: simple script to change the login shell for many users.

 
Bill Hassell
Honored Contributor

Re: simple script to change the login shell for many users.

This is probably the simplest way to change the shell:

for USERID in $(cat file_with_usernames)
do
chsh $USERID /usr/bin/false
done

Just supply a file with all the user names, one per line.


Bill Hassell, sysadmin