Automatic sysLogs Report To Email

install packages:

# yum install ssmtp logwatch

Edit /usr/share/logwatch/default.conf/logwatch:

MailTo =
Range = Yesterday
Detail = 10
Service = xxx
mailer = /usr/sbin/ssmtp -t

The available  services are on /usr/share/logwatch/scripts/services

to config ssmtp you can check

Mail Forwarder Post


# logwatch

and check your e-mail!

User Management Commands

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

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 user add file on Red Hat (/etc/default/useradd)
default user add file on Debian (/etc/adduser.conf)

Enable USB ports For VirtualBox

For Mandriva 2009.1 – 2010.0 :

# adduser vboxusers foo
# cat /etc/group | grep vboxusers
# mkdir /vbusbf

add to /etc/fstab

none /vbusbf usbfs rw,devgid=501,devmode=664 0 0 #devgid is the output id number for vboxusers
# mount -a

For mandriva 2009.0 :

edit /etc/rc.sysinit

if [ ! -d /proc/bus/usb ]; then
 modprobe usbcore >/dev/null 2>&1 && mount -n -t usbfs /proc/bus/usb /proc/bus/usb -o devgid=501,devmode=664
 mount -n -t usbfs /proc/bus/usb /proc/bus/usb -o devgid=501,devmode=664

note: devgid is the output id number for vboxusers.