1855912 Members
8259 Online
104107 Solutions
New Discussion

Re: Mass Password Reset

 
Vishal Phlad_1
Occasional Contributor

Mass Password Reset

Hi,

How does one reset (to a standard password) and exprire passwords (so a user has to change to a new password the first time they login) for all users in a system except for root.

3 REPLIES 3
Pete Randall
Outstanding Contributor

Re: Mass Password Reset

Use "modprpw -E" (assuming this is a trusted system). However, this does *ALL* users, including root.


Pete

Pete
Steven E. Protter
Exalted Contributor

Re: Mass Password Reset

Shalom Vishal,

cat /etc/passwd | | awk -F: '{print $1}' > /tmp/list
#maybe break and edit the list

while read -r username
do

passwd -l $username
done < /tmp/list

rm -f /tmp/list


Stick any passwd command you need in the loop.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Vishal Phlad_1
Occasional Contributor

Re: Mass Password Reset

Hi,

Thanks for the responses.
It is a trusted system.

modprpw -E -> I can use this to expire all passwords.

In the response from SEP how does one supply the password to be used.