1832654 Members
3094 Online
110043 Solutions
New Discussion

Password change

 
O'lnes
Regular Advisor

Password change

How to force a group of users( eg. ACC, EDP, Engineering dept) to change password? thx.





Andy
1 REPLY 1
doug hosking
Esteemed Contributor

Re: Password change

See the '-f' option of the passwd command.
You might have to write a script that does a
grep of the passwd file (or ypcat passwd | grep xxx) to find the correct set of users, use 'cut -d: -f1' to remove everything but the user name part of the resulting entries, and run 'passwd -f' on each entry in that list.

Exactly how this would work on your system might depend in part on things like whether you have a trusted mode configuration or not, whether you're running LDAP, NIS, NIS+ or not, etc.