Issue with docker that messed up my setup

I was trying to install docker on my freebsd via this and after i ran
Code:
pw usermod <myName> -G operator
i could not call the su command.

I tried to boot from single user and ran
Code:
pw usermod <myName> -G wheel
but i get this error output:
pw:gr_tmp(): Read-Only file system.

I tried to boot from the single user and change the /etc/group but i could not change the file, as it is read only as well.

I tried with chmod g+w /etc/group in single user mode as well but still no luck with this error output:

chmod: group: Read-only file system.

Any ideas how i can add again my user in the wheel group? Also, i think my user got removed from the video group so by fixing that it should fix another issue as well.
 
In calling pw usermod <myName> -G operator you replaced all group memberships with operator only. The call should have been pw usermod <myName> -G operator,wheel if you wanted to retain wheel membership. Not sure the proper way to edit /etc/group except to maybe boot using the installer disc/thumbdrive and then drop to a shell and mount / somewhere. I have never had to do this so someone else may have a better way.
 
As Emrion already noted, in single user mode only the root filesystem is mounted and is mounted read-only.

If you want to add someone to a group it's best to use pw groupmod instead of pw usermod. The group mod has an option to add new members to a group; pw groupmod -m myuser somegroup. The -G option of pw usermod replaces all secondary groups with the list you provide.

Code:
     -m newmembers  Similar to -M, this option allows the addition of existing
                    users to a group without replacing the existing list of
                    members.  Login names or user ids may be used, and
                    duplicate users are silently eliminated.

You don't have to "fix" this in single user mode. Just login as root and set the correct permissions for the user.
 
Back
Top