- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- disabling direct access to cde as root
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
11-17-2005 01:29 AM
11-17-2005 01:29 AM
I want to disable direct access as root to our systems, so that users have to login as themselves and then switch user to root, if they need to.
I put "console" in /etc/securetty and this prevents direct access as root via telnet, but users can still login as root if they access to CDE using an Xclient.
Does anyone know how to disable direct root access to CDE?
Best Regards
Luca
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2005 01:53 AM
11-17-2005 01:53 AM
Re: disabling direct access to cde as root
http://www.unixguide.net/hp/faq/5.15.2.3.shtml
http://www1.itrc.hp.com/service/james/dispDoc.do?docURL=http%3A%2F%2Fsearch.hp.com%2Fredirect.html%3Furl%3Dhttp%253A%2F%2Fforums1.itrc.hp.com%2Fservice%2Fforums%2Fquestionanswer.do%253FthreadId%253D717877%26qt%3D%252Bdisable%2B%252Bcde%2B%252Blogin%26hit%3D3&aid=SEARCH_FORUMS&pil=3&serStr=disable+cde+login&pir=3
Good luck,
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2005 01:54 AM
11-17-2005 01:54 AM
Re: disabling direct access to cde as root
Scroll down to the heading "Issuing Commands Before Starting the User Session". That section will help you out.
What you can do is setup the Xstartup to check if the user is root, if so then exit.
Something like this added to the Xstartup should do...
if [ `logname` = root ]
then
exit 0
fi
the doc online explains where and what the Xstartup is.
Hope this helps,
-denver
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2005 02:24 AM
11-17-2005 02:24 AM
Re: disabling direct access to cde as root
Steven, I don't want to disable cde, because users need it to start graphical applications, I only want to prevent them to log in directly as root.
Denver, I tried what you suggested, but it didn't work. I tried replacing `logname` with $USER, but it had no effect, I can still login as root...
Any idea?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2005 03:06 AM
11-17-2005 03:06 AM
Solutioncp /usr/dt/config/Xstartup /etc/dt/config/Xstartup
edit your copy in /etc/dt/config/Xstartup and add:
if [ $USER = root ]; then
exit 1
fi
I don't know if you need to cycle CDE, but it won't hurt. BTW, this is from Chris Wong's book on HPUX 11i security.
HTH,
Tom
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2005 03:27 AM
11-17-2005 03:27 AM
Re: disabling direct access to cde as root
I have no idea though why "exit 0" doesn't really exit and "exit 1" does.
Anyway you've been a great help, thank you again.
Regards
Luca
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2005 07:40 PM
11-17-2005 07:40 PM
Re: disabling direct access to cde as root
As far as I know, the exit code shouldn't affect the behavior of the exit command itself, however, in the very same script(/etc/dt/config/Xstartup) 'exit 1' terminates my xsession, while 'exit 0' still allows me to login as root.
I tried both options on a couple of different machines, and the behavior is the same.
Do you have any idea?
Regards
Luca
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2005 11:19 PM
11-17-2005 11:19 PM
Re: disabling direct access to cde as root
anyhow, exit 0 means the program completed successfully while anything not = 0 means it didn't complete successfully. The dt startup probably got the return code 0 and saw all was well so it kept going. changing it to 1 fixed my bad.
-denver
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2005 12:51 AM
11-18-2005 12:51 AM
Re: disabling direct access to cde as root
thank you again
Luca