Originally Posted by [root@localhost ~]#
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.
However, it is still a galactically bad idea to log in as root