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?
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?
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.
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.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.