Category Archives: quick tips

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)

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
else
 mount -n -t usbfs /proc/bus/usb /proc/bus/usb -o devgid=501,devmode=664
fi

note: devgid is the output id number for vboxusers.

Restart

How to install infraRed on Mandriva 2009.0 NC6000 ?

First Install The package

# urpmi irda-utils

On HP NC6000 you need to edit /etc/sysconfig/irda:

IRDA=yes
#DEVICE=/dev/ttyS2
DEVICE=irda0
#DONGLE=actisys+
DISCOVERY=yes

Download ircp-tray from here. It will ask for dependencies like OBEX utilities and something else missing.

One more step, you need to redirect this:

# echo 9600 > /proc/sys/net/irda/max_baud_rate

(you can put it on an boot script to do this once)

Put in System > Preferences > Sessions

Ircp-tray command to start at boot.

Reboot.