Syed Jahanzaib Personal Blog to Share Knowledge !

January 21, 2010

*niX: Sample smb.conf

Filed under: Linux Related — Syed Jahanzaib / Pinochio~:) @ 8:38 AM

[root@kdcgw aacable]# cat /etc/samba/smb.conf

[global]
log file = /var/log/samba/log.%m
server string = Samba Server Version %v
password server = 192.168.2.4
workgroup = MYGROUP
os level = 20
public = yes
security = server

[zaib]
writeable = yes
path = /var/www/html
write list = zaib
;       guest account = zaib

January 20, 2010

*niX: Howto Open/Create .tar / .tar.bz2 / tar.gz

Filed under: Linux Related — Syed Jahanzaib / Pinochio~:) @ 11:12 AM

To extract files from .tar file use the following syntax
tar xf filename.tar

To compress all file in one .tar file, use the following syntax
tar cvf filename .tar *

To view contents of .tar file:
tar tvf backup.tar 

To Open / Extract For tar.bz2,

tar jxvf filename.tar.bz2
For tar.gz,

tar zxvf filename.tar.gz

January 4, 2010

mrtg: commands

Filed under: Microsoft Related — Syed Jahanzaib / Pinochio~:) @ 7:58 AM

Following is the command to create CFG file for remote pc.

#cfgmaker public@192.168.2.3 > test.cfg

Following is the command to check remote pc snmp info

#snmpwalk -v 1 -c public 192.168.2.2

Following is the command to create index page for your cfg file.

# indexmaker mrtg.cfg –output /var/www/html/mrtg/index.html –columns=1 -compact

Following is the command to run MRTG to create your graph file.

# env LANG=C mrtg mrtg.cfg

January 2, 2010

niX: Crontab> howto add schedule job to run after every 5 minutes . . .

Filed under: Linux Related — Syed Jahanzaib / Pinochio~:) @ 8:47 AM

To schedule any job to run after every 5 minutes,  Follow these steps.

#crontab -e

(Now add the following line)

*/5 * * * * mrtg /etc/mrtg/mrtg.cfg –logging /var/log/mrtg.log

%d bloggers like this: