≡ Menu

FreeBSD Add a User To Wheel Group Command

How do I add a user to the wheel group in FreeBSD unix operating systems using command line options?

You need to use the pw command line utility for adding, modifying and removing users and groups on a FreeBSD operating systems. You must be root user to modify system configuration including pw command.

Add existing user called vivek to the wheel group

The syntax is:

pw group mod {GROUP-NAME-HERE} -m {USERNAME-HERE}
pw group mod wheel -m vivek

If the user named vivek already exists add her to the wheel group.

Add new user called sai while creating a new account

The syntax is:

pw user add {USERNAME-HERE} -G {GROUP-NAME-HERE}
pw user add sai -G wheel

The above command creates the sai primary group automatically, and add a user in the wheel group when her account is first created on a FreeBSD unix operating systems.

How do I verify new group membership on a FreeBSD?

The syntax is:

pw groupshow {GROUP-NAME-HERE}
pw groupshow wheel
pw groupshow sai
pw groupshow vivek
## Determine Group Membership Of sai and vivek Users ##
id sai
id vivek
Share this tutorial on:

Your support makes a big difference:
I have a small favor to ask. More people are reading the nixCraft. Many of you block advertising which is your right, and advertising revenues are not sufficient to cover my operating costs. So you can see why I need to ask for your help. The nixCraft, takes a lot of my time and hard work to produce. If you use nixCraft, who likes it, helps me with donations:
Become a Supporter →    Make a contribution via Paypal/Bitcoin →   

Don't Miss Any Linux and Unix Tips

Get nixCraft in your inbox. It's free:



{ 0 comments… add one }

Leave a Comment

You can use these HTML tags and attributes: <strong> <em> <pre> <code> <a href="" title="">


   Tagged with: