- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Password help
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
02-27-2002 05:21 AM
02-27-2002 05:21 AM
I want all user to change their password when they login next time, Any suggestion or anyone have any script to do this job, I was thinking to get the user name from /etc/passwd and run passwd -f, but I don't wanna change the passwd for root etc. Thanks in advance.Note this is not a trusted system
Anthony
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2002 05:27 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2002 05:35 AM
02-27-2002 05:35 AM
Re: Password help
You can write a quick script to run passwd -f for a list of users
Run
cut -d : f1 /etc/passwd > /tmp/userlist
This will create /tmp/userlist as a list of usernames from /etc/passwd
Then edit /tmp/userlist so that it contains only those usernames that you want to change passwords
Then run
for i in ??cat /tmp/userlist??
do
passwd -f $i
done
This will run passwd -f for each entry in the /tmp/userlist file
HTH,
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2002 05:36 AM
02-27-2002 05:36 AM
Re: Password help
Here's a quick script:
cat /etc/passwd | awk -F: '{if ($3 > 100) system("passwd -f "$1)}'
Change the "if" and "100" if "100" is not the lowest account you don't want to change.
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2002 06:42 AM
02-27-2002 06:42 AM
Re: Password help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2002 07:22 AM
02-27-2002 07:22 AM
Re: Password help
Two options:
1) Enable password aging through SAM
2) Set -f option.
# passwd -f "acct_name"
HTH,
Shiju
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2002 07:30 AM
02-27-2002 07:30 AM
Re: Password help
Chan & Shiju,
If Enabling password aging do I have to make the system trusted, IF yes then this is a production box, is there any precaution I have to take.
Thanks to all again
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2002 07:35 AM
02-27-2002 07:35 AM
Re: Password help
If you do go trusted, be careful with NIS (aka yellow pages), as it doesn't work with trusted systems.
-- Rod Hills
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2002 07:52 AM
02-27-2002 07:52 AM
Re: Password help
Yes, you need to convert your system to Trusted mode inorder to enable pasword aging functions. You can do these through SAM.
Making system trusted has advantages and some disadvantages ( like NIS). See this guide for trusted systems:
http://www.docs.hp.com/hpux/onlinedocs/B2355-90121/B2355-90121.html
Also check this thread for some more information:
http://us-support3.external.hp.com/cki/bin/doc.pl/sid=bd9e15760b1142a5d4/screen=ckiDisplayDocument?docId=200000058669369
HTH,
Shiju
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2002 07:58 AM
02-27-2002 07:58 AM
Re: Password help
passwd -f -x 7 joeuser
When joeuser logged on, the system requested a new password, and it made an entry in /etc/passwd to indicate a max time of 7 days.
Far as I can tell (and the man page for passwd), you don't need a trusted system.
-- Rod Hills
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2002 08:06 AM
02-27-2002 08:06 AM
Re: Password help
When you invoke SAM-Auditing and security-System security policies-Password aging policies, the system will force you to make the system trusted.
The '-f' option with passwd command deosn't require a trusted system. In the man pages of passwd:
A superuser can modify password aging characteristics associated with the user name using the following options - " -d, -f, -l, -x"
Also the -w needs the system to be trusted.
HTH,
Shiju