Operating System - Linux
1754413 Members
3087 Online
108813 Solutions
New Discussion юеВ

Re-enable direct root login

 
Ski Ride
Advisor

Re-enable direct root login

Hi all

I am aware that enabling direct root login is not advisable. But I need to try this out for some of testing purposes. ;-)

I want to enable direct root login using putty (ssh) in hp-ux 11.23. What should I do?

I came across a few posts which said that "PermitRootLogin yes" sshd.config file.
I do not have a file named /etc/securetty.

When i login as root the login screen closes before diplaying the prompt #.

I welcome ur suggestions.
5 REPLIES 5
Steven E. Protter
Exalted Contributor

Re: Re-enable direct root login

Shalom,

http://www.hpux.ws/?p=19

The procedure above may have been done to the ssh daemon configuration.

Even if something else was done, the procedure identifies the possible changes that were made.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
avizen9
Esteemed Contributor

Re: Re-enable direct root login

you need to configure password less ssh need to modify the .ssh/id_rsa

you can generate key with
ssh-keygen -t command,
this will help
Ski Ride
Advisor

Re: Re-enable direct root login

Hi Steven,

I am not sure why i should go for "login by public key and not interactive login" as describe in the link by you. I believe I must use the interactive login only.

The below is the syslog message

Mar 20 12:24:49 gamma sshd[21834]: Accepted keyboard-interactive/pam for root from 172.16.1.38 port 2304 ssh2
Mar 20 12:24:49 gamma sshd[21834]: Accepted keyboard-interactive/pam for root from 172.16.1.38 port 2304 ssh2
Mar 20 12:24:49 gamma sshd[21834]: pam_setcred: error Permission denied

Is it anything to do with pam configuration?
Ski Ride
Advisor

Re: Re-enable direct root login

Also as an addition information the login screen appears but closes immediately.

This is what i get...
You have mail.
logout
Connection to 172.16.1.188 closed.


Any help...? Is it something to do with /.profile?
Ski Ride
Advisor

Re: Re-enable direct root login

There was the following lines added long back in the /etc/profile. After commenting out the exit it works fine.

if [[ $LGNM != "root" ]]
then
HISTFILE=/home/$LGNM/.sh_history
cd /home/$LGNM
else
HISTFILE=/.sh_history
#exit
fi

Keep Smiling :-) .