Add user on FreeBSD using pw

The pw command allow root to add, modify and remove users and groups.

Example:
Adding an user usign add:
# pw useradd -n usern_you_want -s /bin/csh -m
# passwd user_you_want

The optins '-s' and '-m' (s -> Set shell /bin/csh) (-m -> setup home directory /home/user_you_want)

Delete a user usign pw:
# pw userdel -n user_you_want -r

'r' is used to remove the home directory created and all the content.
Note that -r option remove home directory & its contents.

Use help:
# pw useradd help
# man pw

0 Comments: