LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-17-2013, 09:05 AM   #1
[root@localhost ~]#
LQ Newbie
 
Registered: Jan 2013
Location: /dev/null
Distribution: Red Hat Enterprise Linux 6, Red Hat Enterprise Linux 5.5
Posts: 6

Rep: Reputation: Disabled
Lock Screen in 'root' User


My few machines are running on root user. The problem is that RHEL doesn't lock screen after few minutes in inactivity when one is logged in as root.

Is there any way to lock screen after inactivity like it does for normal user?
 
Old 01-17-2013, 09:47 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 19,330

Rep: Reputation: 4473Reputation: 4473Reputation: 4473Reputation: 4473Reputation: 4473Reputation: 4473Reputation: 4473Reputation: 4473Reputation: 4473Reputation: 4473Reputation: 4473
Quote:
Originally Posted by [root@localhost ~]# View Post
My few machines are running on root user. The problem is that RHEL doesn't lock screen after few minutes in inactivity when one is logged in as root. Is there any way to lock screen after inactivity like it does for normal user?
The screen saver should be the least of your worries.

You should hardly EVER log in as root, and if you do, you should NEVER walk off and leave it logged in. ANYONE can come by, sit down, and do ANYTHING to the server. And if you're the administrator, the company is going to look at you for a solution, and to explain how it happened. And, since the X session is running as root:
  • If root started the X session with "startx", you can go to that virtual terminal, do a Ctrl-C (killing X) and get a root shell.
  • If you're using Gnome, you can bypass the root screen lock with a CTRL-ALT-F1...since you're root, it doesn't prompt/ask for confirmation.
You don't say whether you're at a GUI shell or a command-line, but you can TRY typing in "xhost +localhost", which may let you lock the screen via screensaver, but you're still vulnerable. Putting "gnome-screensaver-command –lock" in at the command line may do it.
http://glog.procrasstination.com/ind...!-Updated.html

However, it is still a galactically bad idea to log in as root.

Further reading:
http://www.jwz.org/xscreensaver/faq.html#root-lock
http://www.jwz.org/xscreensaver/faq.html#root-fail
https://live.gnome.org/GnomeScreensa..._in_as_root.3F

Last edited by TB0ne; 01-17-2013 at 11:55 AM.
 
1 members found this post helpful.
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to lock screen while login as root aquamarine Linux - Newbie 2 02-21-2011 02:07 AM
Disable lock session (lock screen) when switch user in KDE 4.x Murz Linux - Desktop 4 12-01-2010 09:28 AM
i loggedin as root but cant lock screen WHY ? farnaw4u Linux - Security 5 05-28-2007 09:47 AM
how to lock screen as root in GNOME? baosheng Linux - Software 1 05-07-2006 04:41 AM
lock the screen as a root user? zstingx Linux - General 3 10-28-2003 04:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:11 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration