- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- password from command line
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
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
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-12-2005 09:52 PM
тАО02-12-2005 09:52 PM
password from command line
ie
passwd user1 password
passwd user2 password
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-12-2005 11:00 PM
тАО02-12-2005 11:00 PM
Re: password from command line
you have to be logged as root to change password of other users.
syntax is:
passwd user1
and system will ask you for new password
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-13-2005 12:45 AM
тАО02-13-2005 12:45 AM
Re: password from command line
su - root
passwd user
passwd -f user (force's the user to change passwd)
if your system is trusted you can reset the account and password by typing
/usr/lbin/modprpw -x user
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-13-2005 04:05 PM
тАО02-13-2005 04:05 PM
Re: password from command line
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-13-2005 04:08 PM
тАО02-13-2005 04:08 PM
Re: password from command line
There is really no other way that I know of via the shell to do this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-13-2005 04:36 PM
тАО02-13-2005 04:36 PM
Re: password from command line
If the users already exist then
#cat /etc/passwd |awk -F: '{print $1}' > file
for i in 'cat file'
do
passwd $i
done
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-13-2005 04:39 PM
тАО02-13-2005 04:39 PM
Re: password from command line
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-13-2005 09:41 PM
тАО02-13-2005 09:41 PM
Re: password from command line
You can use this command, and note that even if /usr/sam/lbin/useradd.sam is a symbolic link to /usr/sbin/useradd, you cannot use this last command.
/usr/sam/lbin/useradd.sam -g users -d /home/username -c "comment of user" -s /usr/bin/ksh -p pass_of_user -o -u 104 user_name
Note the -p option, which with you can precise the password, but the problem is that exactely the word given will be saved on the passwd file (ie: not encrypted).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-13-2005 11:55 PM
тАО02-13-2005 11:55 PM
Re: password from command line
Like Patrick say, you must use expect. With Expect you can 'convert' interactive command like passwd to 'automatic'.
Rgds
JMB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-14-2005 01:45 AM
тАО02-14-2005 01:45 AM
Re: password from command line
And make sure that if you script the "passwordchanger.ksh" you keep the script with passwords in a safe place with filepermissions that only root can see its content and change it.
Regards,
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-14-2005 02:14 AM
тАО02-14-2005 02:14 AM