SAMBA FILE SERVER

Monday, June 8, 2009
Your Ad Here
SAMBA FILE SERVER
SAMBA is a software package that lets you share file system with computer running
Session Message Black (SMB) Protocol.
If we have all RedHat Linux or UNIX systems in our network, using NFS is the best choice.
If we have windows clients, with no NFS installed to access RedHat Linux directories and
files, configuring SAMBA is probably the best choice.
The main configuration-file for SAMBA is /etc/samba/smb.conf.
We can edit this file or can use swat program to configure SAMBA.
Configuring the basic SAMBA server is a three steps procedure –
1 Edit the smb.conf file
2 Add samba users
3 Start samba service

1.
The minimum settings in /etc/samba/smb.conf file are as follows –

[global]
workgroup = WORKGROUP (It will always better to have same workgroup name with the
respective window client – here, WORKGROUP)

netbios name = LINUX (When windows user browse the network, the linux
system will be displayed as LINUX. If we have an WINS server in our network, we must
manually add the host name and IP address of our LINUX SAMBA SERVER)

hosts allow = 192.168.100. (The users from 192.168.100. network can access
the SAMBA Server)

security = user
encrypt passwords = yes
smb passwd file = /etc/samba/smbpasswd
(Established user level security, users need to be authenticated using samba passwords,
stored in / etc/samba/smbpasswd file)
#[Share Defination Section]
[home]
browseable = yes
writable = yes
valid user = %S
(Users can access their respective home directory)

[accounting]
path = path-to-the-directory-you-want-to-share
(The shared folder will have ‘accounting’ share name)
browseable = yes
writable = yes
valid users = user1,user2,user3,@group1
(user1, user2 and user3 are valid users where group1 is a valid group)
It is always better to modify the /etc/samba/smb.conf file to fulfill our purpose.

2.

To add samba users use the following command –
useradd –m username

To create passwords for samba users use the following command –
smbpasswd –a username

3.

To start the samba service immediately –

/etc/init.d/smb start or service smb start

To start the samba service automatically every time the system boots –

chkconfig smb on


An example of /etc/samba/smb.conf may look like this –

# Samba config file created using SWAT
# from UNKNOWN (192.168.100.2)
# Date: 2004/04/03 08:37:46

# Global parameters
[global]
netbios name = LINUX
server string = Samba Server
encrypt passwords = Yes
obey pam restrictions = Yes
pam password change = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *New*password* %n\n *Retype*new*password* %n\n
*passwd:*all*authentication*tokens*updated*successfully*
unix password sync = Yes
log file = /var/log/samba/%m.log
max log size = 0
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
dns proxy = No
hosts allow = 192.168.100.
printing = lprng

[homes]
comment = Home Directories
valid users = %S
read only = No
create mask = 0664
directory mask = 0775
browseable = No


[winusers]
path=/home/winusers
browseable = yes
writable = yes
valid users = user1,@wingroup

Labels: , , , , , , ,

 
posted by Gautam at 12:16 AM, |

0 Comments:

Post a Comment



Post a Comment