Results 1 to 5 of 5
Hello,
Being a newbie to Gentoo I have made some mistakes with what users may access.
I can type groups username and see what the user can access but I ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 08-27-2012 #1Just Joined!
- Join Date
- Sep 2010
- Posts
- 26
Adjusting a users groups
Hello,
Being a newbie to Gentoo I have made some mistakes with what users may access.
I can type groups username and see what the user can access but I don't understand some of the abreviations.
So can someone please tell me -
1/ Is there a site I can visit to read what each of the "access" abreviations allow access to?
2 / How does one go about amending a users access ?
thanks
- 08-28-2012 #2Trusted Penguin
- Join Date
- May 2011
- Posts
- 3,673
do you mean like the output from "ls -l"? e.g.:
Here are a couple articles that describes linux permissions pretty well:Code:-rw-r--r-- 1 joebob users 4 Aug 21 18:19 myfile drwxr-xr-x 2 joebob users 4096 Aug 19 17:27 foo
Linux Files and File Permissions
Linux file permissions
if that's not what you mean, then post what command you are running to get the output, and the output itself.
- 08-28-2012 #3Just Joined!
- Join Date
- Sep 2010
- Posts
- 26
it seems I have not made myself clear
I type
@$ groups dragon
and get the response
root bin disk lp wheel uucp console audio cdrom usb users games scanner cron mysql kdm dragon
Now I do know what root, games, usb, cdrom
But what site can I visit to understand what the rest allow acess to?
And then how do I add and subtact from this list?
- 08-30-2012 #4Trusted Penguin
- Join Date
- May 2011
- Posts
- 3,673
ah, yeah, misunderstood you.
Try this site for an explanation for some of those groups:
https://wiki.archlinux.org/index.php/Users_and_Groups
What you need to understand is how groups work. This can be explained in the links I gave you originally, but here is a simple example. Take this text file, "/tmp/foo.txt", which I will list using "ls -l /tmp/foo.txt":
in the above example, the permissions are divided into three categories: owner (red), group (blue), other (green). therefore, user "joeblow" has read and write perms, all users belonging to the group "admins" also have read and write perms, and anyone else (not joeblow and not in admins and not root) have only read access to the file.Code:-rw-rw-r-- 1 joeblow admins 0 2012-08-30 00:51 /tmp/test.txt
Therefore, to know what membership in all those groups means might best be explained by knowing what files and directories are group-owned by that group.
you could do that with a find command, but it would output a bunch of stuff. here's an example:
Code:#!/bin/bash for group in users wheel lp uucp; do echo "Group $group:" find / -group $group 2>/dev/null done
you can use the usermod command. instead of deleting groups one by one, you'd just give it the new list of groups, including only the ones you really want the user in. here's an example:And then how do I add and subtact from this list?
here, joeblow's main group is "users" and he's also been added to the groups "wheel", and "usb". read the man page for usermod for more details.Code:usermod -g users -G wheel,usb joeblow
- 08-30-2012 #5Just Joined!
- Join Date
- Sep 2010
- Posts
- 26
I was getting most irritated by not being able to find the information I wanted
thanks for your time and trouble


Reply With Quote

