Find the answer to your Linux question:
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.
  1. #1
    Just Joined!
    Join Date
    Sep 2010
    Posts
    28

    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

  2. #2
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,307
    do you mean like the output from "ls -l"? e.g.:

    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
    Here are a couple articles that describes linux permissions pretty well:

    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.

  3. #3
    Just Joined!
    Join Date
    Sep 2010
    Posts
    28
    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?

  4. #4
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,307

    Unhappy

    Quote Originally Posted by meggin View Post
    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?
    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":

    Code:
    -rw-rw-r--  1 joeblow admins 0 2012-08-30 00:51 /tmp/test.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.

    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
    And then how do I add and subtact from this list?
    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:

    Code:
    usermod -g users -G wheel,usb joeblow
    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.

  5. #5
    Just Joined!
    Join Date
    Sep 2010
    Posts
    28
    I was getting most irritated by not being able to find the information I wanted

    thanks for your time and trouble

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •