Command Syntax

From Research
Jump to navigation Jump to search

Command Syntax

GENTOO_KERNEL

cd /usr/src/

ls -la

cp linux/.config linux-2.6.20-hard-r2/

rm linux

ln -s linux-2.6.20-hard-r2/ linux

ls -la +++ cd linux/

make oldconfig

genkernel --menuconfig all

Load the config.bak (type .bak)

ls -la /boot/

vi /boot/grub/grub.conf


ADD SAMABA USER: CHANGED DEFAULT DIRECTORY

useradd jsama

passwd jsama

vi /etc/passwd

jsama:x:1009:1009::/mnt/raid/jsama:/bin/bash

cd /mnt/raid

mkdir jsama

chown jsama jsama

chmod 750 jsama/

usermod -a -G raidaccess jsama

vi /etc/samba/smb.conf

valid users = jsama


vi /etc/samba/smbusers

jsama = jsama

smbpasswd -a jsama

Samba control

/etc/init.d/samba stop
/etc/init.d/samba start
/etc/init.d/samba reload     (for when the smb.conf file changes)

Samba Commands

smbclient -L localhost     (to list available shares on localhost.  Use servername for localhost if you are testing from a remote machine)

OpenLDAP Commands

On a remote machine, you can access and dump the whole LDAP tree:

ldapsearch -x -b 'dc=whiterock' -D "cn=Manager,dc=whiterock" '(objectclass=*)' -H ldap://192.168.0.110 -W     (home)
ldapsearch -x -b 'dc=iat,dc=sfu,dc=ca' -D "cn=Manager,dc=iat,dc=sfu,dc=ca" '(objectclass=*)' -H ldap://209.87.56.238 -W    (campus)