Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

usermod script 1

Status
Not open for further replies.

breckwiz

Technical User
Jun 18, 2001
3
US
Hi Gurus.

I need some help, I'm in dire need of a script to grep groups from /etc/group and run usermod on these groups to stop the password aging. Can anyone please help?

Thanks!
 
Hi,
u can give the following command to get a list of groups
cat /etc/group|cut -f 1 -d ":"
But how r u going to do usermod on groups?
What is u'r specific need?
 
Basically, what I need to do is:

All users at work have to change their passwd after a certain amount of days. What I need is a script to run that will pick certain groups out and modify their passwd aging. I need to make it zero, so they do not have passwd aging. Did this make sense? If not, let me know and I'll try to re-explain it. :)

Thanks!
 
I guess I should've mentioned that I won't be doing anything with the /etc/group file, just want to grep out groups from there to run usermod -f o against.

Thanks again!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top