Operating System - HP-UX
1834141 Members
1911 Online
110064 Solutions
New Discussion

Re: Can not login as root remotely and in the console/server

 
Bart Paulusse
Respected Contributor

Re: Can not login as root remotely and in the console/server

in single user mode:
create directories /root2 and /root3
edit /etc/passwd
manually add these lines:
root2::0:3::/root2:/sbin/sh
root3::0:3::/root3:/usr/bin/sh

then boot to run level 3 and see if you can logon with root equivalent users root2 and root3
monster00
Advisor

Re: Can not login as root remotely and in the console/server

hi tried this .. but can't edit the /etc/passwd ... the editor is not working.. vi
R.K. #
Honored Contributor

Re: Can not login as root remotely and in the console/server

Hello,

To edit /etc/passwd file you can use command:
# /usr/sbin/vipw

Regds,
R.K.
Don't fix what ain't broke
monster00
Advisor

Re: Can not login as root remotely and in the console/server


vipw does not exist.. even the edit..

no way to edit passwd...
u have other suggestions?
monster00
Advisor

Re: Can not login as root remotely and in the console/server

hey guys! thanks a lot for the help.
fixed the problem.
Patrick Wallek
Honored Contributor

Re: Can not login as root remotely and in the console/server

If you are in single-user mode, then vi will NOT work automatically because no filesystems are mounted. You must first do:

# vgchange -a y vg00
# mount /tmp
# mount /usr

Now you should be able to edit the /etc/passwd file.

I am not sure it needs it though.

One thing you should do is run:

# pwck

This will check your /etc/passwd file for consistency and will report any errors with the file.

monster00
Advisor

Re: Can not login as root remotely and in the console/server

thanks.found out that the passwd file has an extra space in the root line...

using single user mode, mount -a
then edit the passwd file.

now it's working.