1823423 Members
2484 Online
109655 Solutions
New Discussion юеВ

unable to login as Root

 
SOLVED
Go to solution
Ramaprasad K
Regular Advisor

unable to login as Root

Hi Experts,

There is a C8000 workstation with HP-UX 11.11 installed on it. Root password was forgotten, so went into Single User mode and tried changing it.

When almost done (confirmed 2nd time), error came saying can't change passwd as root partition is full. Then deleted some data and freed up some space. Then tried to change password, the nightmare started from here- It said, 'not valid login, can't change password'.

Rebooted system, then went into single user mode again, then it throws an error saying , no 'root' id or 'bin' id , check '/etc/passwd' and reboot. When i check the file, it is 0 bytes. Fortunately, there was another old passwd file which I moved to new file and tried to change passwd for root. It accepted and changed successfully. Created another user 'sp99975' and rebooted. When the W/S came up, the CDE login was not accepting 'root' login but only 'sp99975'.

Went into Single User mode again, and tried changing password for root. It was successful. Checked /etc, there were 2 passwd files with following properties:

... root root 682 Jan 6 04:25 passwd
... root sys 791 Jan 6 06:11 passwd
... root sys 791 Dec 4 2005 passwd.sav_12:05

(note: '...' above means valid permissions)

After that, any no of attempts of changing root passwd is successful, but logging in into root is unsuccessful. While the user 'sp99975' login is successful. Also, after 3rd reboot, even CDE is not coming with following error 'Unable to launch CDE, check error file Dtlogin.errorlogFile(/var/dt/Xerrors))

Please help me out.

Regards,
Ramaprasad K
16 REPLIES 16
yulianto piyut
Valued Contributor
Solution

Re: unable to login as Root

check in sshd_config, edit the line "#PermitRootLogin yes", remove "#" to enable direct login using root, restart sshd (kill -HUP sshd_pid). for security, root user can not direct login to server, the common user must use sudo to access root user.
Ramaprasad K
Regular Advisor

Re: unable to login as Root

Thanks for that quick reply.

Where exactly is sshd_config?
Pete Randall
Outstanding Contributor

Re: unable to login as Root

/opt/ssh/etc/sshd_config


Pete

Pete
yulianto piyut
Valued Contributor

Re: unable to login as Root

for the default is in /opt/ssh/etc/sshd_config
Ramaprasad K
Regular Advisor

Re: unable to login as Root

Thanks Pete and yulianto,

Shall check and update you.

Also, what about the CDE? It is not starting giving the error I wrote in my first post.

Ram
Dennis Handly
Acclaimed Contributor

Re: unable to login as Root

>what about the CDE? It is not starting giving the error I wrote in my first post.

What was in the error file? /var/dt/Xerrors/Dtlogin.errorlogFile
Ramaprasad K
Regular Advisor

Re: unable to login as Root

hi,

Sorry to say, there is no ssh folder under /opt. Any other path?

-Dennis:What was in the error file? /var/dt/Xerrors/Dtlogin.errorlogFile?

Fatal Server Error:
Server is already active for display0
If this server is no longer runnnig, remove /tmp/.X0.lock and start again
When reporting a problem related to a server crash, please send the full server output, no just the last messages.
Please report to you HP support representative.

Wed Jan 7 11:23:04 2009
error (pid 3279)Server unexpectedly died.
Wed Jan 7 11:23:09 2009
error (pid 3279)Server for display SPHP039:0 can't be started.

Thanks,
Ram
SKR_1
Trusted Contributor

Re: unable to login as Root

check in root home directory.

servername:/root/.ssh/sshd_config

Thanks

SKR
SKR_1
Trusted Contributor

Re: unable to login as Root

Sorry...........for my first reply. It was for other thread

You can find in below directory.

/opt/ssh/etc

Thanks

SKR
Ramaprasad K
Regular Advisor

Re: unable to login as Root

>>SKR
>>You can find in below directory.
>>
>>/opt/ssh/etc


No chance. ssh folder is not there under /opt. Even there is no /root directory.

Any other path?

SKR_1
Trusted Contributor

Re: unable to login as Root

Can you try to find the file

find / -name sshd_config

Thanks

SKR
yulianto piyut
Valued Contributor

Re: unable to login as Root

hi,
try to find with command:
#find / -name sshd_config
give us output of:
#ps -ef|grep sshd



Ramaprasad K
Regular Advisor

Re: unable to login as Root

hi

No success.

$ps -ef |grep sshd
-> no output

$find / -name sshd_config
find: /tmp... not found
.
.
.

(note: ... represents the path of files, repeats for all files in the mounted partitions viz., /opt, /tmp, /var)
Avinash20
Honored Contributor

Re: unable to login as Root

Hi,

As I understand, you are unable to login via root to CDE, while for other user login is possible

If my understanding is correct, please do the following

open a ssh session and check the following logs while you try to give the username and password for root

# tail -f /.dt/startlog

Also you might try to create a user with admin rights and check if he is able to login

# useradd -o -u 0
"Light travels faster than sound. That's why some people appear bright until you hear them speak."
yulianto piyut
Valued Contributor

Re: unable to login as Root

sorry,

can you telnet to this server?
check if there is a ssh software in your server
#swlist |grep -i secure

if no ssh software, install this software first.
Ramaprasad K
Regular Advisor

Re: unable to login as Root

Thanks all for your time and suggestions.

There were many other issues including 'not accepting grep (|)', so confirmed form user and Reinstalled OS. Working fine now.

Thanks,
Ramaprasad K.