"usermod -a -G <group> <user>".
Check out useradd.
gpasswd -a Stewart wheel
In linux adduser and useradd commands are used to add user account.
Every user of Linux is belonging to at least one group. GID (Group ID) is used to identify the group. A group can have many users. Also whenever a user is created in Linux a Group is created with the same name. You can find group information in /etc/group file. To display contents of file use command cat /etc/group
A Linux user can belong to multiple groups, and in most circumstances, it would be very difficult to utilize a Linux system without being so.
Creating a new user in Linux or Unix is typically done with the adduser command. The basic syntax is:adduser -g [group] -n [username]where group is the group (admin, scanners, cups, vboxusrs, etc...) that you want the new user to be part of, and username is the name that they log in with. You will need either root access, or be part of the "sudoers"group in Ubuntu.
useradd
You can create a new group with the command groupadd.Ex. 'groupadd students'
Use the 'newgrp' command.
The last answer to this was incorrect. Whether or not you are the only user on the system or not: Linux is always a multi-user operating system.
There is a command called useradd in Linux which you can use to add a new user. Here's an example 1. Add the user (you need to be a superuser to run this command) # useradd test 2. Set the password # passwd test Changing password for user test. New UNIX password: Retype new UNIX password: passwd: all authentication tokens updated successfully.
To add groups,use "groupadd" command Syntax: groupadd -g 241 DBA 241 is the group id and DBA is the group name
logical volume manager