- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Password script
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
01-27-2002 06:25 PM
01-27-2002 06:25 PM
Password script
I have a Unix system (OS 10.20 without the Trusted System. If don't want to use SAM for each user's password changing. Can I write a password script for all users which force them to change password at once? Thank you very much.
Best Regards
ajk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2002 07:12 PM
01-27-2002 07:12 PM
Re: Password script
Try "passwd -f login_name" this should force the user to change the password. Look at the man page of passwd command.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2002 07:15 PM
01-27-2002 07:15 PM
Re: Password script
#awk '{FS=":";print $1}' /etc/passwd > userlist
#vi userlist
#for USER in `cat userlist`
>do
>passwd -f $USER
>done
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2002 10:16 PM
01-27-2002 10:16 PM
Re: Password script
cat /etc/passwd |awk -F: {print $1} |
while read i
do
passwd -d $i
passwd -f $i
done
note:
passwd -d
passwd -f
Good luck.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2002 05:39 PM
01-28-2002 05:39 PM
Re: Password script
I did try your method, but it said "does not exist". Do you know why? Thanks
Best Regards
ajk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2002 06:24 PM
01-28-2002 06:24 PM
Re: Password script
USERLIST=`grep "/home" /etc/passwd | awk -F: '{print $1}'`
for EACH in $USERLIST
do
passwd -f $EACH
done
Where "/home" is where user directories live...
hth
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2002 10:39 PM
01-29-2002 10:39 PM
Re: Password script
Your all information are very helpful.
Thank you very much!
Best Regards
ajk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2002 10:10 PM
09-17-2002 10:10 PM
Re: Password script
How are you? Long time no see.
This time, I am doing the password script again. I make the 'userlist' file and then run:
# for USER in 'cat userlist'
> do
> passwd -f $USER
> done
then it has the message:
Usage:
passwd [name]
passwd -r files [-F files] [name]
passwd -r files [-e [shell]] [-gh] [name]
passwd -r files -s [-a]
passwd -r files -s [name]
passwd -r files [-d|-l] [-f] [-n min] [-w warn] [-x max] name
passwd -r nis [-e [shell]] [-gh] [name]
passwd -r nisplus [-e [shell]] [-gh] [-D domain] [name]
passwd -r nisplus -s [-a]
passwd -r nisplus -s [-D domain] [name]
passwd -r nisplus [-l] [-f] [-n min] [-w warn] [-x max] [-D domain] [nam
e]
passwd -r dce [-e [shell]] [-gh] [name]
#
Do you guys know why? Thank you!
ajk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2002 01:18 AM
09-18-2002 01:18 AM
Re: Password script
Are you using 'cat userlist' or `cat userlist`? The quotes could be your problem.
Regards
Michael