- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: passwords
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
Forums
Discussions
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
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
09-27-2004 08:56 AM
09-27-2004 08:56 AM
passwords
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2004 09:01 AM
09-27-2004 09:01 AM
Re: passwords
'/usr/sam/lbin/usermod.sam' will come in useful here. Once you added the users (You can use useradd command via a script), then do
1. Set one user with the standard password.
2. Grab the encrypted password from /etc/passwd or /tcb/files/auth/
#for user in $(cat your_user_list)
do
/usr/sam/lbin/usermod.sam -p "
passwd -f $user
done
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2004 09:08 AM
09-27-2004 09:08 AM
Re: passwords
`awk -F: '{print $1}' /etc/passwd` >> /tmp/users.tmp
cat /tmp/users.tmp | while read users
do
echo $user: \c
passwd $user
passwd -f $user
done
It will ask you for password for all users in your system, you can discard using egrep -v "xx|xx..|xx"
or tail -
I dont see any option to pass the password to passwd command through some input.
Hope above helps
all the best
Prashant
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2004 09:23 AM
09-27-2004 09:23 AM
Re: passwords
Prashant
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2004 09:24 AM
09-27-2004 09:24 AM
Re: passwords
For your own saftey make a backup of the password file and then use substitution s/:.*?:/XXXXX/g
this would change the password field for all the users.
-Goodluck
Govind
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2004 09:28 AM
09-27-2004 09:28 AM
Re: passwords
do a pwconv after that, that should match all entries in password file and /tcb.
Hope above helps
Prashant
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2004 02:49 PM
09-27-2004 02:49 PM
Re: passwords
Expect also comes with a tool called autoexpect which generates code (similar to Macro recording)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2004 06:57 PM
09-27-2004 06:57 PM
Re: passwords
i could think of something like :
for i in `cat /etc/passwd|awk -F: '{print $1}'`
do
passwd -d -f $i
done
Deletes PW for each user and forces hime to select a new one upon login
Regards
Franky
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2004 07:01 PM
09-27-2004 07:01 PM
Re: passwords
assigning points is also a good thing, btw :-)
I have assigned points to 8 of 104 responses to my questions.
Regards
Franky
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2004 08:09 PM
09-27-2004 08:09 PM
Re: passwords
Your requirement can be done as,
for user in `listusers | awk '{ print $1 }'`
do
passwd -df $user
# Make a mail to user
echo "Null for passwd done on $user. You have to change it during login there" | mailx -s "passwd on `hostname` $user@yourdomain.com
done
We can not assign 12345 passwd to everybody there. For that we can keep them as NULL Passwd so that it will not be having passwd but during next login it will be asked to change the passwd.
Note: Assign points to your every post / reply there so that you will get response for your query at once. See franky message there.
HTH.