CentOS 6U4 i automatsko podizanje WIN share-a

Kako da vam se automatski, uvek podigne WIN share pod CentOS-om 6?
Pa neophodni početni uslovi su :
# yum install samba-client samba-common cifs-utils
Podesiti da se smb i nmb automatski podižu (neko dodatno konfigurisanje nije potrebno).
Napraviti mount point :
# mkdir /media/windowsshare

E sada smo spremni!
Samo kratko, kako to uraditi peške :
# mount -t cifs //itxyz/ITxyz /media/ITxyz -o user=admin.test
Passwd :
A kako to uraditi automatski, pri svakom podizanju sistema :
U /etc/fstab uneti sledeću liniju (na kraju) :
//windowsshare/moj-podfolder /media/windowsshare cifs user,uid=500,rw,suid,username=velda,password=moja-lozinka,iocharset=utf8,sec=ntlm 0 0
# mount -a
I to je to.

Šta je šta u /etc/fstab liniji, odnosno opšti sadržaj /etc/fstab fajla :
“file system” “dir” “type” “options” “dump” “pass”
file system – The partition or storage device to be mounted.
dir – The mountpoint where is mounted to.
type – The file system type of the partition or storage device to be mounted. Many different file systems are supported: cifs, ext2, ext3, ext4, btrfs, reiserfs, xfs, jfs, smbfs, iso9660, vfat, ntfs, swap and auto. The auto type lets the mount command guess what type of file system is used.
options – Mount options of the filesystem to be used.
dump – Used by the dump utility to decide when to make a backup. Possible entries are 0 and 1. If 0, dump will ignore the file system; if 1, dump will make a backup. Most users will not have dump installed, so they should put 0 for the dump entry.
pass – Used by fsck to decide which order filesystems are to be checked. Possible entries are 0, 1 and 2. The root file system should have the highest priority 1, all other file systems you want to have checked should have a 2. File systems with a value 0 will not be checked by the fsck utility.
*****
user,uid=500,rw – daje RW prava nad windowsshare useru velda, čiji je uid=500 (info o uid-u ne mora da se stavi, ali bolje je da ga ima….)
cifs – protokol koji se koristi (u Sambi je integrisan od njene verzije 2.2.4)

Sve opcije vezane za ovo se dobijaju upitom :
# man mount.cifs