# Issue with docker that messed up my setup



## kxyd (Jan 20, 2021)

I was trying to install docker on my freebsd via this and after i ran 
	
	



```
pw usermod <myName> -G operator
```
 i could not call the su command.

I tried to boot from single user and ran 
	
	



```
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.


----------



## Sevendogsbsd (Jan 20, 2021)

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.


----------



## Emrion (Jan 20, 2021)

In single user mode, you can make your file system writable (the method depends on the root file system you use). See here: https://forums.freebsd.org/threads/change-single-user-read-only.77997/


----------



## SirDice (Jan 20, 2021)

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. 


```
-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.


----------



## kxyd (Jan 21, 2021)

SirDice Emrion Sevendogsbsd  Thank you all so much for your help, I logged in and as root in multiuser mode and fixed that issue!


----------

