User Management Commands

SAMBA
smbpasswd -x foo (delete samba user)
smbpasswd -a foo (create samba user)

LINUX
useradd -M foo (create user with no home directory)
useradd -c “name” -M foo (create user with real name)
userdel -r foo (delete user’s files and home directory)
userdel foo (delete only user entry)
usermod -a -G group user (add an existent user to a group)
useradd -g group user (add a new user to a group)
useradd -G group1,group2,group3 user (add user to a list of groups)
groupadd name_group (create a group)
id -nG user (show groups for user)
groupdel (delete an existent group)
adduser (verbose command to create users)

DEFAULT FILES:
default user add file on Red Hat (/etc/default/useradd)
default user add file on Debian (/etc/adduser.conf)

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s