LinuxQuestions.org
Visit Jeremy's Blog.
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 06-13-2011, 08:56 AM   #1
lazerking9
LQ Newbie
 
Registered: May 2011
Distribution: Ubuntu
Posts: 24

Rep: Reputation: 12
Post GUI to manage user rights/privileges


I recently took over administration of a system with 40 or 50 active users. because of the nature of the files my users work with, it is important that each user's file/program access rights be tightly controlled (to keep people from peeking where they don't belong), as well as be easily managable.

Instead of editing each user's permissions/rights individually (which would waste a nice chunck of my time), I was wondering if there was a nice, friendly GUI available that can help me NOT spend all day managing user groups/permissions? I need something that I can open up and configure all my users in just a few minutes. (install through rpm or apt-get, if possible)

In addition, there are a few hard-working, well-meaning users on my system that just do not know how to leave well enough alone. They like to go in and tweak their personal settings (desktop, icons, themes, display settings, etc). That is all well and good, but they don't know what they are doing (not very computer-friendly people) and end up destroying their accounts (ie-rendering them unusable). Is there something I can do/use to completely lock down ALL their settings so they cannot change *any* of their settings?
(I know how to configure sudoers so they have no access to system settings and the like, but i also need them to be unable to change their personal account settings) Any suggestions here?
 
Old 06-13-2011, 05:21 PM   #2
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
If you really want to save time, develop a script to do the work for you. One command, and you're done. No pointy-clicky-ticky-tacky to get in the way. Plus, comments in the script explain how it works, how to use it, and what it does.

--- rod.
 
Old 06-14-2011, 08:05 AM   #3
lazerking9
LQ Newbie
 
Registered: May 2011
Distribution: Ubuntu
Posts: 24

Original Poster
Rep: Reputation: 12
but my main problem is this- i don't even know where to begin scripting for this. I have written some handy scripts in the past for bash, but I can't think of where to start on this. I've done maintainance scripts, intelligent file transfers, but i'm clueless here.
Scripting or not, where do I start?
How do I go about stopping users from making changes (other than things like personal documents, etc..)
 
Old 06-14-2011, 09:52 AM   #4
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
Well, whatever you would do manually, you can put in a script. The advantage of scripting is the ability of a script to do iteration. If you have a list of users either in a specially crafted file, or in some existing data, then you can loop over all users in the list, performing the same operations on each one.
It sounds like you might also need to make better use of user groups; assigning file & directory group ownership may make your life simpler. You can make users' configuration files read-only, but this may break some tools and/or render truly useful features unusable (file-open histories, as an example). Another defense against mis-configured user data is the ability to restore to a working state from backups. Setting up a daily or even more frequent rsync to another host is one good way to do it. It gives you the ability to do selective restores of only the broken pieces, since it makes a filesystem oriented copy, open to inspection by you or, optionally, the end-users themselves.

--- rod.
 
Old 06-14-2011, 10:20 AM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984
I don't understand how a GUI would actually help you here? By their very nature they are more restrictive as you are limited to the clicky and spinny things presented to you. What kinds of things would use up all your day, and what how do you see this being easier with a gui?

You've only one system you say... that sounds pretty simple to me...
 
0 members found this post helpful.
Old 06-14-2011, 11:02 AM   #6
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
This is what many users fail to distinguish, IMHO. A GUI might make things easy to figure out the first two or three times, but is far from efficient when it has to be used repetitively. Short-term gain for long-term pain. In contrast, using scripts may take some up-front effort, but the payoff will be long-term. Moreover, the sooner you undertake the effort, the sooner the payoff starts.
There are other more subtle payoffs, too. Some of them, I've already hinted at, and others as well. Documenting your work for those that follow is fairly tricky when you have to explain how to click here and menu there (add to the problem what happens when the GUI changes across revisions). Explaining how to use a script is as simple as saying 'run thisScript withThisData'. Modifying the script to do things slightly differently to accommodate a special circumstance is something you won't likely be able to do with a GUI. Perhaps most importantly, if you wrote the script, you will have a much better understanding of what it does, and to know what effects (both good & bad) that it might have.

--- rod.

Last edited by theNbomr; 06-14-2011 at 11:04 AM.
 
1 members found this post helpful.
Old 06-15-2011, 10:44 AM   #7
lazerking9
LQ Newbie
 
Registered: May 2011
Distribution: Ubuntu
Posts: 24

Original Poster
Rep: Reputation: 12
Quote:
Originally Posted by lazerking9 View Post
but my main problem is this- i don't even know where to begin scripting for this. I have written some handy scripts in the past for bash, but I can't think of where to start on this. I've done maintenance scripts, intelligent file transfers, but i'm clueless here.
So, i need to write a script that will help me manage my users' rights. Where do I start?
 
Old 06-15-2011, 11:01 AM   #8
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
Quote:
Originally Posted by lazerking9 View Post
So, i need to write a script that will help me manage my users' rights. Where do I start?
You start by defining "manage". What exactly do you need it to do?
 
Old 06-15-2011, 12:27 PM   #9
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984
Quote:
Originally Posted by MTK358 View Post
You start by defining "manage". What exactly do you need it to do?
Yeah we've asked for this a few times now. Do you actually know yourself what the work is?
 
Old 06-15-2011, 12:48 PM   #10
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
Quote:
Originally Posted by MTK358 View Post
You start by defining "manage". What exactly do you need it to do?
Once you've done that, you start trying the commands that you think will manage one user's permissions. Doubtless, that will involve the use of commands like, chown, chgrp, & chmod, as well as any number of standard commands such as cp, cat, more or less (pun intended), ls etc. Try to create a 'recipe' that applies to one user. Once you've done that, see if there is a way to identify the rest of the users that are to be managed from an existing context, and if not, compile a list of user IDs that need to be managed. Turn your recipe into a full-on script by iterating over all users in your list.

A trivial example of the kind of progression I've described:
Code:
#
#  The 'recipe' for a single user
#
sed -i 's/umask 0002/umask 0022/' /home/joeUser/.bashrc
chmod o-w /home/joeUser/.bashrc
#
#  more, as necessary....
Now make a list of all users,
Code:
echo "" > yourUserList.txt
for username in /home/*; do
    echo $username >> yourUserList.txt
done
Modify the recipe, to iterate over all users in the list. Maybe edit the list as appropriate.
Code:
while read user; do
    sed -i 's/umask 0002/umask 0022/' /home/${user}/.bashrc
    chmod o-w /home/${user}/.bashrc
    #
    #  more, as necessary....
done < yourUserList.txt
Does that help?
--- rod.
 
  


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
super user privileges check for a normal user in bash script freeindy Programming 2 08-01-2008 06:08 AM
Linux - How to add a new user with the same root/super-user's privileges? asgarcymed Linux - General 8 12-23-2006 07:45 PM
Asking for root privileges in a GUI app sleeping Programming 4 09-07-2006 12:57 PM
Manage LVMs (no GUI) Notwerk Linux - Software 2 01-10-2006 08:32 AM
Squid proxy with user authentication and user rights duvanhorn Linux - Networking 0 08-07-2003 03:40 AM

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

All times are GMT -5. The time now is 06:46 AM.

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