Wednesday, 28 December 2011

SAMBA SERVER

SAMBA SERVER
This server is used to share the directories and files to WINDOWS and LINUX
PACKAGES NEEDED: samba, samba-common, samba-client
Yum list samba*
IF THE RPM'S IS NOT AVAILABLE INSTALL THROUGH YUM
yum install samba*
START THE DAEMON SERVICES
service smb start
TO CHECK THE AVAILABLE SAMBA SHARES IN THE LOCAL SYSTEM
smbclient -L localhost -N
( you should get a response from the samba server, but no indication of available shares)
-L
a list should appear
To look at what services are available on a server. You use it as smbclient -L and
-N
is useful when accessing a service that does not require a password.
This parameter suppresses the normal password prompt from the client to the user. This
THE MAIL CONFIGURATION FILE CAN BE EDITED AS FOLLOWS
vi /etc/samba/smb.conf
[global]
workgroup = REDHAT
[pub]
comment = windows sharing
path = /var/ftp/pub
public = yes
writable = yes
[home]
comment = share of user home directories
path = /home
public = no
valid users = Admin
create mask = 0765
hosts allow = 192.168.0. (or) 172.24. (or) 10.
OPTIONS AVAILABLE ARE:
public
browseable ==> share is visible in browse lists
writable ==> resource is read and write enabled
printable ==> resource is a printer, not a disk
group
TO RESTART THE DAEMON SERVICES AND TO ENABLE AFTER REBOOT
service smb restart/reload
chkconfig smb on
TO CHECK THE AVAILABLE SAMBA SHARES IN THE LOCAL SYSTEM
smbclient -L localhost -N
==> share can be accessed by guest
==> all connections to the share use the specified GROUP as the primary group
TO CHECK THE SYNTAX OF THE CONFIGURATION FILE
testparm
CREATE THE USERS NEEDED TO CHECK
useradd Admin
passwd Admin
smbpasswd -a Admin
smbpasswd -e Admin
TO CHECK THE SHARE IS ACCESSIBLE FROM THE LOCAL OR NOT
smbclient //192.168.0.x/home -U Admin
mount -t cifs //192.168.0.x/home /opt -o username=Admin
=======> to create samba password
=======> to enable samba password

No comments:

Post a Comment