Operating System - HP-UX
1821589 Members
3380 Online
109633 Solutions
New Discussion юеВ

Enabling root user from cmd line prompt

 
hmorrison
Advisor

Enabling root user from cmd line prompt

How do i reactivate the root user account from the command line prompt in single user mode on a server running HPUX 10:20. Thanks
7 REPLIES 7
Yang Qin_1
Honored Contributor

Re: Enabling root user from cmd line prompt

Hi, I'm not sure I understand "re-activate" correctly. When you boot to single user mode, you are "root" user already. You may change root password by "passwd root". Then you can boot your server to multi-user mode and you can logon with your personal account and "su - root" type the new password you created in single user mode. Is this what you want to archieve?

Yang
hmorrison
Advisor

Re: Enabling root user from cmd line prompt

I logged on with the root password in single user mode, but even if i change the password and reboot in multi user mode, it will still be locked. I am unable to use SAM to unlock it because I have a problem mounting /usr, the file system is corrupt and fsck is not helping.
IT_2007
Honored Contributor

Re: Enabling root user from cmd line prompt

edit /etc/passwd and remove encrypted letters in the second field for root and then change root password.

Is your system converted to trusted mode?
Yang Qin_1
Honored Contributor

Re: Enabling root user from cmd line prompt

If you cannot mount /usr, you may try passwd -u root to unlock root account under single user mode. After unlock root, maybe re-create the root password again before you boot it to multi user mode.

Good Luck,
Yang
DCE
Honored Contributor

Re: Enabling root user from cmd line prompt



If your system is in trusted mode:

/usr/lbin/modprpw -k root

Patrick Wallek
Honored Contributor

Re: Enabling root user from cmd line prompt

If /usr is not accessable, the it will be kind of difficult for him to use /usr/lbin/modprpw.

I would concentrate on getting /usr fixed and then enable root.

To fix /usr I would try:

# fsck -F vxfs -o full -y /dev/vg00/lvol7

(If /usr is not lvol7, substitute the correct lvol number there)

If that does not fix /usr, then you may need to think about restoring it.
hmorrison
Advisor

Re: Enabling root user from cmd line prompt

Thanks all, I was able to fix the corrupted file system, mount /usr and start SAM. I am however grateful for the command /usr/lbin/modprpw -k root