- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Changing a list ofe users 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
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
07-06-2004 01:57 AM
07-06-2004 01:57 AM
I need a simple script to change a mess or user's passwoods form a list of users/passwords on our backupserver.
I thought I could use a simple scrip like this to do it but I get hung up on the passwd prompt for password . I thought this might be easier than resyncing the /etc/passwd file.
= = = = = = =
while read USERID PASSWORD
do
passwd $USERID
# some thing needed in here
done < /path/to/users/list.txt
= = = = = =
What am I missing?
Marty
Solved! Go to Solution.
- Tags:
- Password
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2004 02:10 AM
07-06-2004 02:10 AM
Re: Changing a list ofe users passwords
The passwd command can not be used the way you are trying it.
You can use expect tool for this. Get it from porting centre.
The osther option is using sam usermod.sam command.
It can be used as follows.
/usr/sam/lbin/usermod.sam -p "password" user_name.
The password has to be a encrypted password.
Like
/usr/sam/lbin/usermod.sam -p `echo "123abcdexy"|/usr/lbin/makekey` user_name.
Here the password is 123abcde and xy are salt chars required for encrypting the password.
Anil
- Tags:
- usermod.sam
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2004 02:26 AM
07-06-2004 02:26 AM
Re: Changing a list ofe users passwords
Will I still beable to let the users change the password with out them knowing the encrypting key? Or is that handled by the system.
This looks like I could use this im my script.
Marty
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2004 03:16 AM
07-06-2004 03:16 AM
SolutionLater on user can login with the password and change their password to whatevr they want.
Anil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2004 03:17 AM
07-06-2004 03:17 AM
Re: Changing a list ofe users passwords
That is just what I wanted to happen.
Marty
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2004 11:39 PM
08-02-2004 11:39 PM
Re: Changing a list ofe users passwords
After I change the password using the following command /usr/sam/lbin/usermod.sam -p `echo "123abcdexy"|/usr/lbin/makekey` user_name as given above, I tried passwd -f username command as I wanted the user to change the password at first logon.
I am able to login with the password set above and I get a old password menu for me type in the password and after I type in the password, I get the following message.
Your password has expired.
Choose a new password.
Changing password for sundpsp
Old password:
Sorry.
Login aborted due to no password.
Can Someone help me.