LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 09-24-2007, 10:39 AM   #1
ElvisImprsntr
Member
 
Registered: Aug 2007
Location: Florida
Posts: 33

Rep: Reputation: 19
Screen lock settings: How to restrict changes?


BACKGROUND

I am running xscreensaver and have configured the settings to lock the screen automatically after 15 minutes. I have searched through the Linux - Security forum here and came across similar questions on other forums http://nixcraft.com/getting-started-...rotection.html

Under Windows, in the Group Policy Object Editor, collapse Computer Configuration, under User Configuration, expand Administrative Templates, expand Control Panel, and then click Display. Then set Password protect the screen saver = enabled and Screen Saver Timeout = [no. of seconds]. This prevents user from changing the timeout and password protect settings.

Under Linux using xscreensaver, because it runs with setuid for root privileges in order to access the password and shadow files, even if I set the owner:group to root:root, xscreensaver will write over the .xscreensaver file and reset change the owner:group back to what it was previously for that userid.

I pinged the author of xscreensaver, whom for the most part confirmed this.


QUESTION

Is there a way to change the permissions of the .xscreensaver file and/or of the xscreensaver setuid process to restrict users from changing the lock settings?

Or is there another tool or option to restrict changes?




Elvis
 
Old 09-25-2007, 10:15 PM   #2
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
I have tried too, to make my .xscreensaver file unchangeable, but it just doesn't work.

An idea: The method I use to edit or configure my screensaver is 'xscreensaver-demo'. This is the recomended way, according to the docs. Locate this script in /usr/X11/bin/ and remove the execute permissions from it. Now, the screensaver daemon still works, but the configuration tool doesn't.

NOTE: there might be another tool/script which can also be used to config the screensaver. I don't know for sure, but if there is, do the same to that.

Now, change the users .xscreensaver file to root:root r--r--r

Does this help? More importantly, does it work?

(I'm testing whether the second part works.. Back in a few moments.)

EDIT: Yes, this seems to work.

Last edited by GrapefruiTgirl; 09-25-2007 at 10:29 PM. Reason: extra thought..
 
Old 09-26-2007, 06:42 PM   #3
ElvisImprsntr
Member
 
Registered: Aug 2007
Location: Florida
Posts: 33

Original Poster
Rep: Reputation: 19
GrapefruiTgirl,

Thanks! Work great.

On my Debian distro the GUI script lives in /usr/bin/xscreensaver-demo and I changed the .xscreensaver permissions to root:root rw-r-r

Elvis

P.S. I'll try and send some sunshine your way!
 
Old 09-26-2007, 07:01 PM   #4
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
Great, I'm glad that works for you!

I started messing with the .xscreensaver pieces a while back after spending a significant amount of time hand tuning my screensaver. What annoyed me was that if I wanted to start the -demo just to LOOK AT things, like to browse some other savers, it would instantly overwrite my custom file, even if I didn't do anything, and I got tired of replacing my file with the backup I had made eventually.

Anyhow, happy computing, and thank you for the kind offer of sunshine-- perfect timing for us up this way
 
  


Reply



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
GDM "Lock screen" item fails to lock down. Swan1 SUSE / openSUSE 9 02-03-2009 12:00 AM
How to disable Lock Screen when close laptop screen? amosbatto Linux - Laptop and Netbook 2 01-16-2006 11:12 PM
nvtv messes up my screen settings, screen split in half lagu2653 Linux - Software 0 12-13-2005 02:29 PM
Screen Lock up when enabling full screen in VLC unux82 Linux - Software 0 07-20-2005 03:01 AM
Screen lock changes screen resolution ohzo Linux - Laptop and Netbook 0 06-23-2004 11:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 07:04 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
Open Source Consulting | Domain Registration