Tag Archives: samba

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

Mount Samba volume

to mount smb volume:

# smbclient --list host_smb_server

when you already know which folder you want to mount then

# mount -t cifs -o username=joe //host_dir/shared_folder /media/smb

this command will prompt you the password… type it.

to find out what is mounted on system:

# mount