Add user in freebsd to secondary group not primary group
Hi everyone. I have a linux box with FreeBSD and i have some questions. How do i Add user in freebsd to secondary group not primary group? Please help me. I am a newbie when the operating system is linux... I hope i find correct help... :biggrin: Thanks in advance... :rolleyes:
Re: Add user in freebsd to secondary group not primary group
To add a new user to the system's secondary group you must have a group defined. Say for example the user name will be 'fame' and must be in the secondary group 'second' then the command will be :
Code:
pw useradd fame -G second
pw fame
The second line of the command is used to change/set the password for the username 'fame'. Hope this helps... :thumbup1:
Re: Add user in freebsd to secondary group not primary group
Aaw! I'm so sorry i did not detail what i want to do. I have three user account created, i want to add the existing username 'freebsd123' to a secondary group named 'gamer'. Can i do this? Or will i have to create a new user after deleting the exisiting user account? Please help.. Thanks in advance... :rolleyes: :notworthy
Re: Add user in freebsd to secondary group not primary group
Ok, that is possible and indeed very simple to do. Just open terminal and type the following command :
Code:
pw usermod frebsd123 -G gamer
Also if you want to add an existing username to multiple groups you can do it by :
Code:
pw usermod username -G group1,group2
Hope this is what you want... :thumbup1: