- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Restricting direct root login on console
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2010 11:11 PM
06-10-2010 11:11 PM
I need to disable direct root login on console of HP-UX11.31. Can anyone tell me the process for that ?
Thanks & regards,
Kavita
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2010 11:45 PM
06-10-2010 11:45 PM
Re: Restricting direct root login on console
You can then e.g. point at the big, secure lock in the door of the server cabinet and say "*That* is what prevents root logins on the console." Most auditors will understand that a locked door can be used to secure the system.
But if you really want to do it through software configuration, make sure you have some authorized way to access the root account, like sudo, PowerBroker or whatever. Then set a very long and difficult root password, don't document it anywhere and just forget it.
If you have the optional free "LongPassword" depot for 11.31 installed (it's available at software.hp.com), you can use passwords of up to 255 characters.
A 80-character root password that is completely random and not written anywhere will make direct root logins pretty much impossible.
But remember:
If an unauthorized person has a physical access to your server and really wants your data, he/she will just crash & reboot your server to single user mode to get it.
If the system is configured to require a password to access the single user mode, the unauthorized person will just plug in a disk with his/her own OS installation or boot the system using the recovery mode of a HP-UX installation CD.
Bottom line: *All* the protections of the OS can be worked around if the hardware is not physically secure.
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2010 04:21 AM
06-11-2010 04:21 AM
Re: Restricting direct root login on console
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2010 04:33 AM
06-11-2010 04:33 AM
Re: Restricting direct root login on console
Usually all devices tty/pty etc other than console is restricted for direct root login. As console is considered to be a safe place for root login.
Raj.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2010 04:44 AM
06-11-2010 04:44 AM
SolutionDisable direct root login:
You have to add "PermitRootLogin no" to /opt/ssh/etc/sshd_config file: & stop/start ssh.
http://forums11.itrc.hp.com/service/forums/questionanswer.do?&threadId=742400
http://forums11.itrc.hp.com/service/forums/questionanswer.do?admit=&threadId=1367457
Restricting direct root login on console:
This document talks about:
http://dataprotected.files.wordpress.com/2008/05/hp-ux-security-check.pdf
Disable direct root login:
Restrict root logins to system console:
Hth,
Raj.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2010 04:56 AM
06-11-2010 04:56 AM
Re: Restricting direct root login on console
>Restricting direct root login on console:
You can do something like this:
Add this line to global .profile , and try it out: (Before adding to actual scenario you may test the script first on a console session ):
At the end of .profile :
#---------------------------------
TTY=`tty`
ID=`whoami`
if [[ $TTY -eq "/dev/console" && $ID -eq "root" ]]
print "Root Login on Console!! is not allowed! Exiting!" > /dev/console
exit 0
else
print "User $ID logged in to console: `date`" > /dev/console
fi
#--------------------
Cheers,Have fun!,
Raj.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2010 04:58 AM
06-11-2010 04:58 AM
Re: Restricting direct root login on console
#---------------------------------
TTY=`tty`
ID=`whoami`
if [[ $TTY -eq "/dev/console" && $ID -eq "root" ]]
then
print "Root Login on Console!! is not allowed! Exiting!" > /dev/console
exit 0
else
print "User $ID logged in to console: `date`" > /dev/console
fi
#--------------------
cheers,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2010 08:57 AM
07-09-2010 08:57 AM
Re: Restricting direct root login on console
you just simple create a file .
#touch /etc/securetty
that's it
now you can try to log in through MP Console
It will never allow you to log in!
Regards
Deeos
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2010 03:55 AM
07-20-2010 03:55 AM
Re: Restricting direct root login on console
Bill Hassell, sysadmin