Blog

03/06/2019

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?

[donotprint][/donotprint]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

Posted by: SXI ADMIN

The author is the creator of nixCraft and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.

14/08/2019

How to KVM, QEMU start or stop virtual machine from command line (CLI)

KVM or Kernel Based Virtual Machine is a popular virtualization technology. It allows you to run virtual guest machines over a host machine. To start...
14/08/2019

How to Docker backup Saving and restoring your volumes

Running a Docker volume backup First, we spin up a temporary container, and we mount the backup folder and the target Docker volume to this container....
12/08/2019

How to Start and Enable Firewalld on CentOS 7

In this article, we discuss how to start and enable firewalld. It is highly recommended that you have a firewall protecting your server.Pre-Flight CheckThese...