You can add user with useradd.
root # useradd -g users -G wheel,portage,audio,video,usb,cdrom,tty -m <username>
You can delete user with userdel.
root # userdel -r <username>
You can list groups with group.
user $ groups user $ groups <username>
Add or remove user from group
You can add or remove user from group with gpasswd.
root # gpasswd -a <user> <group> root # gpasswd -d <user> <group>
Create new group
You can create new group with groupadd.
root # groupadd <group>
You can also delete group with groupadd.
root # groupdel <group>
You can change file permissions with chmod.
user $ chmod <r><g><u> <file>
<r> = number for root permissions <g> = number for group permissions <u> = number for user permissions
7 = 4+2+1 (read/write/execute) 6 = 4+2 (read/write) 5 = 4+1 (read/execute) 4 = 4 (read) 3 = 2+1 (write/execute) 2 = 2 (write) 1 = 1 (execute)
Change owner and group of file
You can change owner and group of file with chown.
root # chown <user>:<group> <file>
You can change owner of folder and files inside recursively with:
root # chown -R <user>:<group> <folder>