LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
LinkBack Search this Thread
Old 06-18-2007, 11:14 PM   #1
Joe_Wulf
LQ Newbie
 
Registered: Jun 2007
Location: Baltimore, Md
Distribution: RHEL AS5
Posts: 5

Rep: Reputation: 0
RHEL AS4ux ScreenSaver for root


I've been working (struggling?) to understand how to get the screensaver for root to function properly, lock the screen after so much time, etc......

Any and all help to get this to function is greatly appreciated.

R,
-Joe Wulf
 
Old 06-19-2007, 09:12 AM   #2
brianmcgee
Member
 
Registered: Jun 2007
Location: Munich, Germany
Distribution: RHEL, CentOS, Fedora, SLES (...)
Posts: 398

Rep: Reputation: 36
First of all it would be good to know if you are using any window manager (e. g. Gnome or KDE) or if you want to simply lock the console without X.

For console, screen may do the trick. You can lock the CLI with CTRL+A+X. Also vlock can be used to lock out people from an unattended terminal. if you use the bash shell you could use the timeout to lock you out after you leave the desk for a user defined time.

For example this will you logout from bash after 5minutes inactivity:
Code:
# export TMOUT=300
If you run screen, this session may be resumed.

If you use Gnome, the default window manager for RHEL4, you can access the settings for the screensaver with RedHat-(Applications)-Menu->Preferences->Screensaver. Set Blank Screen and Lock Out as desired.

A note from [1]:
Quote:
Don't log in as root.

Please note that xscreensaver works fine as a screen saver when you are logged in as root: it will not, however, lock your screen when you are logged in as root. This is for good and insurmountable security reasons.

In order for it to be safe for xscreensaver to be launched by xdm, certain precautions had to be taken, among them that xscreensaver never runs as root. In particular, if it is launched as root (as xdm is likely to do), xscreensaver will disavow its privileges, and switch itself to a safe user id (such as "nobody".)

An implication of this is that if you log in as root on the console, xscreensaver will refuse to lock the screen (because it can't tell the difference between root being logged in on the console, and a normal user being logged in on the console but xscreensaver having been launched by the xdm "Xsetup" file.)

The solution to this is simple: you shouldn't be logging in on the console as root in the first place! (What, are you crazy or something?)

Proper Unix hygiene dictates that you should log in as yourself, and su to root as necessary. People who spend their day logged in as root are just begging for disaster.
If you use KDE then you should run KDE Control Center->Appearance & Themes->Screensaver. There you can enable the screensaver to start automatically (e.g. 15 minutes). Also you can set a password that is required to deactivate it. You should use only blank screen. Some screensavers really use massive ressources (although at a low priority).

[1] http://www.jwz.org/xscreensaver/faq.html#root-lock
 
Old 06-19-2007, 07:24 PM   #3
Joe_Wulf
LQ Newbie
 
Registered: Jun 2007
Location: Baltimore, Md
Distribution: RHEL AS5
Posts: 5

Original Poster
Rep: Reputation: 0
Brian,

You asked good questions and gave good insights and gave good advice. Thank you.
1. I'm using RHEL AS4 (any/all updates) and both 32 and 64 bit.
2. Gnome is the default and standard desktop GUI used here, when they initiate a GUI. The system norm is to be at runlevel 3 with 'xfs' stopped. And sudo is enabled/configured for these folks.

I'm building a general secure baseline for others to use. Generally they'll have to live with the hardening I put in place, though they can modify anything based upon need and secondary approval, supported by justification.

I heartily agree that to never (or as close as possible) log in as root is the ideal. As a practical matter, I know for a fact that there are many SysAdmins who'll LIVE at the root prompt regardless of the security measures put in place. Especially for those who'll take my baseline and play with it for days, or weeks to establish the newest version of their application, or whatever.

One of the things I've done through pam is disable all local and remote root login's, both for the text console and within the Gnome GUI. However, once a SysAdmin has logged in with their userID and switched to root, then can start 'xfs' and execute 'startx'. I'm quite aware of this as a prolific 'norm'. Yes, I know it is bad. I do not have any power to influence anyone who uses my build, other than to make it difficult to 'get' there.

Along the way I have folks to answer to as far as how secure my baseline build is. One of the things among many I know they are looking at is the screensaver for all accounts. Thus my rationalle for seeking some technical solution to lock the console via the screensaver.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
unable to login as user other than root on RHEL 4 done some changes in etc /shawdow abhi_raj Linux - Newbie 1 07-18-2006 08:47 AM
why root can't use screensaver? muzzamil.luqman Linux - Newbie 6 12-12-2005 05:49 AM
enable screensaver when loged as root mlu Linux - Software 1 06-15-2005 01:22 AM
lock root account after 3 login attempts - RHEL AS 3 jrparker2005 Red Hat 1 05-17-2005 12:43 PM
screensaver as root window on startup contrasutra Linux - Software 3 04-30-2003 09:46 PM


All times are GMT -5. The time now is 08:41 PM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration