- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- SAM Unable to modify Password Options Aging on 11....
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-31-2007 01:55 AM
08-31-2007 01:55 AM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-31-2007 02:15 AM
08-31-2007 02:15 AM
Re: SAM Unable to modify Password Options Aging on 11.11 non-trusted
#!/usr/bin/sh
typeset -i DAYS=84
typeset U=''
awk -F ':' '{if (($3 + 0) >= 101) {print $1}' /etc/passwd | while read U
do
echo "User: ${U}"
passwd -x ${DAYS} ${U}
done
-----------------------------------
This will set all regular users (UID's >= 101) with a 12 week expiration.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-31-2007 02:26 AM
08-31-2007 02:26 AM
SolutionSAM has a option to let you view the commands it has run based on your choice. You can then take this code and test it to see what went wrong.
A script is a much better way to do this however. I use sam for single task's where I don't know the command to do the job and to let operators and such do limited things I don't like to do.
If you want to modify one user,sam is fine. If you want modify them all, use A. Clay's script.
According to my recollection what you are trying to do should work. Perhaps there is a problem with sam. Have you installed the latest sam patches?
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-31-2007 02:38 AM
08-31-2007 02:38 AM
Re: SAM Unable to modify Password Options Aging on 11.11 non-trusted
-----------------------------
awk -F ':' '{if (($3 + 0) >= 101) {print $1}' /etc/passwd | sort > mylist
Now use vi to edit "mylist" to remove users that you don't want to modify and ...
#!/usr/bin/sh
typeset -i DAYS=84
typeset U=''
cat mylist | while read U
do
echo "User: ${U}"
passwd -x ${DAYS} ${U}
done
... and yes, I know the "cat mylist |" spawns an extra process but Big Woo.
-----------------------------------
-----------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2007 07:45 PM
09-03-2007 07:45 PM
Re: SAM Unable to modify Password Options Aging on 11.11 non-trusted
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2007 07:56 PM
09-03-2007 07:56 PM