Find the answer to your Linux question:
Results 1 to 6 of 6
While trying to install VirtualBox I typed 'usermod -G vboxusers {myusername}' following instructions from some internet site. Next thing I knew my audio wasn't working, other things too. Well, after ...
  1. #1
    Just Joined!
    Join Date
    Feb 2007
    Posts
    21

    help, "usermod -G" wiped my groups

    While trying to install VirtualBox I typed

    'usermod -G vboxusers {myusername}'

    following instructions from some internet site.

    Next thing I knew my audio wasn't working, other things too. Well, after some google searches it turns out the command as typed removed all my other groups instead of adding vboxusers to them ( from this forum - https : / / bugs.launchpad.net/ubuntu/+source/shadow/+bug/317647, sorry the link is garbled but the site gives me some error that I can't post links).

    Now I can't figure out how to restore my groups because I don't know what groups they used to be.

    I hope someone tells me how to find out what my groups used to be so I can add myself to them.

  2. #2
    Linux Guru reed9's Avatar
    Join Date
    Feb 2009
    Location
    Boston, MA
    Posts
    4,651
    Yeah, usermod is dangerous. You needed to add the append flag (-a).

    You're using Debian, so you should have a root account enabled?

    You can get a list of groups with
    Code:
    cat /etc/group
    I always use gpasswd to add users to groups.

    Code:
    gpasswd -a user group
    As for which groups you should add yourself back to, I'm not sure what they're all called in Debian. Different distros have different names.

    Look for these groups:
    users
    cdrom
    floppy
    plugdev
    audio
    video
    power
    network


    There may be more that you'll want. If you post your /etc/group file, I'm sure someone can help point out which ones you'll want to belong to.

  3. #3
    Just Joined!
    Join Date
    Feb 2007
    Posts
    21

    My /etc/group file

    > You're using Debian, so you should have a root account enabled?

    Yes, I have a root account. I just need to know which groups to add.


    > There may be more that you'll want. If you post your /etc/group file, I'm sure someone can help point out which ones you'll want to belong to.

    Here's my /etc/group. So far I've added myself to vboxusers, netdev and audio.

    Code:
    root:x:0:
    daemon:x:1:
    bin:x:2:
    sys:x:3:
    adm:x:4:
    tty:x:5:
    disk:x:6:
    lp:x:7:
    mail:x:8:
    news:x:9:
    uucp:x:10:
    man:x:12:
    proxy:x:13:
    kmem:x:15:
    dialout:x:20:
    fax:x:21:
    voice:x:22:
    cdrom:x:24:
    floppy:x:25:
    tape:x:26:
    sudo:x:27:
    audio:x:29:alexander
    dip:x:30:
    www-data:x:33:
    backup:x:34:
    operator:x:37:
    list:x:38:
    irc:x:39:
    src:x:40:
    gnats:x:41:
    shadow:x:42:
    utmp:x:43:
    video:x:44:
    sasl:x:45:
    plugdev:x:46:
    staff:x:50:
    games:x:60:
    users:x:100:
    nogroup:x:65534:
    libuuid:x:101:
    crontab:x:102:
    Debian-exim:x:103:
    mlocate:x:104:
    ssh:x:105:
    alexander:x:1000:alexander
    messagebus:x:106:
    haldaemon:x:108:
    powerdev:x:109:
    avahi:x:110:
    netdev:x:111:alexander
    ssl-cert:x:112:
    lpadmin:x:113:
    scanner:x:114:saned
    saned:x:115:
    gdm:x:107:
    toni:x:1001:
    milko:x:1002:
    sambashare:x:116:
    nobody:x:1003:
    sambamachines:x:1004:
    stb-admin:x:117:
    vboxusers:x:118:alexander

  4. #4
    Linux Guru reed9's Avatar
    Join Date
    Feb 2009
    Location
    Boston, MA
    Posts
    4,651
    I don't know Debian groups too well, but I think you should add yourself to video, cdrom, powerdev, and users.

    Others you may want are lp (for printing), scanner, floppy (if you have a floppy drive), I'm not sure what the disk group is for Debian, but I think you'll want it, and if you plan to set up sudo, you likely need the adm and/or sudo groups.

    If you find yourself unable to do something as your user that you used to be able to, or think you should be able to, you can always google around and see if you should add yourself to a pertinent group as well.

  5. #5
    Just Joined!
    Join Date
    Feb 2007
    Posts
    21
    I added myself to these groups.

    Code:
    audio:x:29:alexander
    video:x:44:alexander
    users:x:100:alexander
    alexander:x:1000:alexander
    powerdev:x:109:alexander
    netdev:x:111:alexander
    vboxusers:x:118:alexander
    Any other groups I should add myself to?

  6. #6
    Linux Guru reed9's Avatar
    Join Date
    Feb 2009
    Location
    Boston, MA
    Posts
    4,651
    Any other groups I should add myself to?
    If you're not running into weird permissions problems, you're probably good.

Posting Permissions

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