1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Can't add user to group wheel

Discussion in 'General' started by zachnap, Feb 17, 2012.

  1. zachnap

    zachnap New Member

    Messages:
    6
    Thanks Received:
    0
    Hello, I'm new to freeBSD. I am trying to add a user to group wheel. I have entered the following code:
    Code:
    pw user mod username -G wheel


    I enter this command and I get no error message, it just goes to a new command line. Then I type:

    Code:
    groups username


    and all I get is username, it does not list wheel as a group for that user.
     
  2. monkeyboy

    monkeyboy New Member

    Messages:
    96
    Thanks Received:
    10
    looks to me like it is supposed to be:
    # pw usermod username -G wheel

    but I never use that thing... what's wrong with
    # vi /etc/group

    you are root when trying, right?
     
  3. zachnap

    zachnap New Member

    Messages:
    6
    Thanks Received:
    0
    Never mind... I finally figured-out that my file system was read-only. I had no idea why I was getting this response when trying to use vi and view and other things.

    I just used the command:

    Code:
    mount -u /


    and that apparently changes the file system to read-write. Then I modified the user grouplist and added wheel.
     
  4. zachnap

    zachnap New Member

    Messages:
    6
    Thanks Received:
    0
    It doesn't matter whether "usermod" or "user mod" - its the same thing.

    I couldn't use vi before since the file system was set to read-only. I am root, single-user.

    Thanks for the reply though.
     
  5. SirDice

    SirDice Moderator Staff Member Moderator

    Messages:
    17,628
    Thanks Received:
    2,386
    If you boot in single user mode only the root (/) filesystem is mounted. Read-only.

    To get some functionality you need to remember these (you're going to use them often):
    Code:
    fsck -p         # if you have errors fsck -y might be a better idea
    mount -u /      # re-mounts root read-write
    mount -t ufs -a # mounts all UFS filesystems
    swapon -a       # turns on swap/virtual memory
    adjkerntz -i    # adjusts for the timezone
    


    After that the system is in a reasonable state to edit things.
     
  6. zachnap

    zachnap New Member

    Messages:
    6
    Thanks Received:
    0
    Thanks. I don't know what all that stuff means yet but hopefully I will at some point.