Re: root login (87 Views)
Reply
Frequent Advisor
Jonathan Grymes
Posts: 80
Registered: ‎09-23-2004
Message 1 of 3 (160 Views)

root login

[ Edited ]

We recently had an authenticated scan (inside the firewall) run against our HPUX servers which ended locking up the root account. The scan attempted to login as root many times which caused the account to lock. I noticed if I try to login as root via ssh I get the banner display but the login attempt fails as expected. Do you know of any additional security configurations that would prevent root login attempt from even getting “in the door”. We should only have root login at the console or via su. Any suggestions you have would be greatly appreciated.

 

I have the following configurations:

In /etc/securetty

console

 

In sshd_config

PermitRootLogin no

 

 

P.S. This thread has been moved from HP-UX > System Administration to HP-UX > security. - HP Forum Moderator

Please use plain text.
Honored Contributor
Bill Hassell
Posts: 14,170
Registered: ‎05-29-2000
Message 2 of 3 (144 Views)

Re: root login

There is no way to tell if a login attempt is from a security scan or from someone trying to break in. One (bad) way to prevent this is to increase the number of failed login attempts to a large number such as 500. But this defeats the purpose of a retry limit. Another solution is to install sudo and authorize certain trusted sysadmins to run root-only commands without su. That way, the damage can be repaired easily.

 

If you use ssh for logins and scp for file copies, you can disable ftp, telnet, remsh, rcp, rlogin and rexec in inetd to increase your security.

 

But the real issue is that a primitive security scan that attempts root login attempts can ruin an entire data center with root lockouts, regardless of whether it is Linux, HP-UX, Solaris, AIX, etc. For production systems, the security department, external auditor or consultant must craft security scans that do not cause this type of damage.

Please use plain text.
Advisor
RJHall
Posts: 25
Registered: ‎05-30-2013
Message 3 of 3 (87 Views)

Re: root login

[ Edited ]

Since there is no way for the probe to distinguish between a failed login attempt and a login that is locked out, from a business perspective I think it's a practical approach to use a cron job to periodically unlock accounts that have been locked out. I use userdbget -i -a "auth_failures"' to detect accounts that are past the range set by AUTH_MAXTRIES, then userdbset -d -u {account} auth_failures to clear it. After doing so I post a log entry.

Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation