- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- avoid lost password
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
10-29-2007 07:41 PM
10-29-2007 07:41 PM
avoid lost password
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2007 07:45 PM
10-29-2007 07:45 PM
Re: avoid lost password
>so that I still can login as root when the password is lost
You can always go into single user mode and reset the password.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2007 08:17 PM
10-29-2007 08:17 PM
Re: avoid lost password
"go into single user mode" need reboot the system , I think it is the worst case , so I would like to find a good method in advance I make that mistake .
thx.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2007 08:21 PM
10-29-2007 08:21 PM
Re: avoid lost password
see
man passwd
"Multiple superusers are allowed, but are strongly discouraged. That is because the system often stores user ID rather than user name. Having unique IDs for all users will guarantee a consistent mapping between user name and user ID."
Caution: Never delete this account with SAM!
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2007 08:24 PM
10-29-2007 08:24 PM
Re: avoid lost password
Well, I'm not sure this is any better security wise but you always add another superuser.
You can just copy root's line to another with a different name.
(Of course the best way is to learn from your mistakes. ;-)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2007 08:25 PM
10-29-2007 08:25 PM
Re: avoid lost password
http://hpux.asknet.de/hppd/hpux/Sysadmin/sudo-1.6.8p12/
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2007 09:09 PM
10-31-2007 09:09 PM
Re: avoid lost password
All you need to do is use the new password which you had just provided when you typed passwd without the userid.
Best way to 'avoid' this issue is to start realising using root is a potential danger and think twice or even more before you press enter after typing a command.
Changing the password is not such a big deal but eg a typo with rm can be a total disaster.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2007 09:30 PM
10-31-2007 09:30 PM
Re: avoid lost password
You may consider setup root equivalent as a standby in case you root password lost.
WK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2007 02:14 AM
11-01-2007 02:14 AM
Re: avoid lost password
Haviing multiple UID 0 accounts is considered very poor practice so I wouldn't go that route. You might consider setting up a sudo'ed command that will let you as a regular user run the passwd command as root.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2007 02:14 AM
11-01-2007 02:14 AM
Re: avoid lost password
Having multiple UID 0 accounts is considered very poor practice so I wouldn't go that route. You might consider setting up a sudo'ed command that will let you as a regular user run the passwd command as root.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2007 02:23 AM
11-01-2007 02:23 AM
Re: avoid lost password
This should be VERY easy to avoid. If you are changing passwords for a user, when logged in as root, and forget to put the user-id on the command line, well that is your own fault and no fault of the systems.
Doing 'passwd
Now, that being said, I have sudo set up on ALL my machines (HP-UX and Linux) and ALWAYS use 'sudo su -' to log in as root. I don't even know the root password to my machines. It changes automatically daily. So far I have had no problems with using sudo to login as root.
I also agree that having multiple UID 0 accounts is a very BAD idea. It is considered a high security risk in any system audit.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2007 02:25 AM
11-01-2007 02:25 AM
Re: avoid lost password
There is no reason to use root to reset user IDs.
The root user account is supposed to be used to administer the system not operate it.
You can use the sam restricted shell and grant password reset power to an operator user and let them use sam to reset the password.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2007 02:36 AM
11-01-2007 02:36 AM
Re: avoid lost password
root is the only id that can reset other users passwords.
>>>The root user account is supposed to be used to administer the system not operate it.
Passwords are part of sys admin, at least in my mind.
>>>You can use the sam restricted shell and grant password reset power to an operator user and let them use sam to reset the password.
This is just doing what it needs to do as root in the background.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2007 02:54 AM
11-01-2007 02:54 AM
Re: avoid lost password
sudo is really making this easy by avoiding the mess more than one super user accounts are prone to cause, and with the added benefit of logging.
Grab ixSudo from HP's Internet Express
because it is easiest to install.
In the provided sudoers file, which you must edit only via visudo,
there's already rules for a group called wheel
(I think they have adopted this naming from FreeBSD)
If it doesn't already exist create it with groupadd wheel.
Then add any user who occasionally requires root privileges to group wheel (usermod -G wheel
and uncomment any of these two (depending if you want your users to authorize by their password or not (for the latter the NOPASSWD stanza would apply)).
Of course you are free to do this with any other group name if you don't fancy wheel.
# grep wheel /opt/iexpress/sudo/etc/sudoers
# Uncomment to allow people in group wheel to run all commands
# %wheel ALL=(ALL) ALL
# %wheel ALL=(ALL) NOPASSWD: ALL