Posts Tagged ‘User Management’

Reminder to add an user on NetBSD

December 17th, 2008 No comments

This is just a little reminder about adding user on NetBSD.
The basic way is to use :

# useradd -G <group_2> -b /home -g <group_1> -k /etc/skel -m -s /usr/pkg/bin/bash -v <user>

This add <user> in primary group <group_1> and secondary group <group_2>, create is home in /home/<user> using /etc/skel as skeleton. It also set the shell to bash.

N.B: in /etc/passwd you will see the primary group of each user.
In /etc/group you will find, for each group, the list of user that are inside the group as secondary group.
N.B: You can also use id command to see all group of an user, it will display uid, gid (primary group) then all secondary group

Categories: NetBSD Tags: ,