Friday, May 30, 2008

How to tell server model/type


I suggest running a sysreport. As root, simply type sysreport, hit enter and follow the intstructions when it is done collecting your info. If you want to run it without collecting package info (which can take quite a while) use the -norpm switch. It generates a compressed file, after you untar it you will have a directory containing all your system information. One of the files is called "hardware.py" cat hardware.py and grep it for the word "system" - this will show not only the model, but the serial number and bios version.

Tuesday, May 27, 2008

Samba mount

Mount a Samba share with read write access, where the share is in a Active directory domain

mount -t smbfs //halifax6/Media /home/usamantaray/samba/ -o rw,username=usamantaray/flagstonere,gid=users,dmask=777,fmask=777

Anonymous access of samba share on a linux machine


[global]

workgroup = HOME

server string = Samba Server

security = SHARE

passdb backend = tdbsam

log file = /var/log/samba/%m.log

max log size = 50

dns proxy = No

wins support = Yes

hosts allow = 192.168.2., 127.

[homes]

comment = Home Directories

read only = No

browseable = No

[share]

comment = Public Share

path = /share

read only = No

create mask = 0666

directory mask = 0777

guest ok = Yes

[printers]

comment = All Printers

path = /var/spool/samba

printable = Yes

browseable = No

chmod 0777 /share
writable = yes

# vi /etc/samba/smbpasswd

nobody:99:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:[DU ]:LCT-00000000:

save and exit

IPTABLE Configuration to allow samba share.

# iptables -A INPUT -i eth1 -p tcp -m tcp --dport 138 -j ACCEPT

# iptables -A INPUT -i eth1 -p tcp -m tcp --dport 139 -j ACCEPT

# iptables -A INPUT -i eth1 -p tcp -m tcp --dport 137 -j ACCEPT

# iptables -A INPUT -i eth1 -p tcp -m tcp --dport 445 -j ACCEPT

# service iptables save

# vi /etc/sysconfig/iptables

Move the above 4lines to up

# service iptables restart

Net use command in windows to view and unmount a remote share

To see the remote share connected to this machine

C:\> net use

To disconnect remote share connected to this machine

c:\> net use \\172.16.193.231\IPC$ /delete