Monday, December 26, 2011

Samba Server Configuration


[root@ns1 ~]# yum install samba* -y
[root@ns1 ~]#vim /etc/samba/smb.conf

#============== Global Settings ====================

 workgroup = WORKGROUP
 server string = Samba Server Version %v

;netbios name = MYSERVER

;interfaces = lo eth0 192.168.12.2/24 192.168.13.2/24
hosts allow = 192.168.50.0/24

[Saiful-samba-server]
        comment     = Technical Support Stuff
        path        =/Samba_Techsupport
        browseable  = yes
        writable    = yes
        valid users = saiful,krahman,rajan

[root@ns1 html]# mkdir /Samba_Techsupport
[root@ns1 /]# chmod 777 Samba_Techsupport/
[root@ns1 html]# chkconfig smb on
[root@ns1 html]# /etc/init.d/smb restart
Shutting down SMB services:                                  [  OK  ]
Shutting down NMB services:                                  [  OK  ]
Starting SMB services:                                           [  OK  ]
Starting NMB services:                                           [  OK  ]

[root@ns1 html]# smbpasswd -a saiful
New SMB password:
Retype new SMB password:
Added user saiful.
[root@ns1 html]# smbpasswd -a krahman
New SMB password:
Retype new SMB password:
Added user krahman.
[root@ns1 html]# smbpasswd -a rajan
New SMB password:
Retype new SMB password:
Added user rajan.




[root@ns1 html]# chcon -Rt samba_share_t /Samba_Techsupport/
[root@mail samba]# mount -t cifs //192.168.50.18/Samba_Techsupport /samba -o username=saiful
Password: