SAMBA Configuration in Linux
SAMBA comes from the name SMB ( Server Message Block ). This configuration makes the Microsoft’s client operating system to access the linux machine ‘s shared files.
But without any configuration Linux machine can access Microsoft’s shared data.
Samba will be used for sharing the directory or resources to windows and MAC systems. Some of the uses of samba are
- Authentication of user
Neighborhood system can access the linux’s shared file only with authentication ( i.e., username and password )
- File and printer sharing
Sharing the printer in network to use the printer by any system in that network.
For authentication, file and printer sharing the service used is smbd
- Name resolution browsing
For name resolution browsing, service used is nmbd
SAMBA Configuration in Linux RHEL5
Service : smb
Packages: Packages used in samba configuration
samba
sambacommon
sambaswat( for GUI )
sambaclient
xinetd
All samba related packages will be installed by using yum package samba
#yum install samba*
Port Number: 137, 138, 139
Server Side:
Configuration directory: /etc/samba
Configuration file: /etc/samba/smb.conf
#vim /etc/samba/smb.conf
Line 26WORKGROUP = LINUX
[MYSHARE]
Comments : information
Path :
valid users : root
public : no
writable : yes
printable : no
createmask : 0770
browseable : yes
hosts allow : 192.168.1.11
hosts deny : 192.168.1.12
hosts allow = example.com
hosts allow = 192.168.1.0/24
:wq!
#smbpasswd -a root
smbpassword: ***
Reenter password: ***
#smbpasswd -e root
smbpasswd -a root –> Assigning samba password for root, which will be used while sharing file in neighborhood system
smbpasswd -e root –> By commanding this only user (root) will be enabled for samba
How to Create SAMBA user
username: user1
password: 123
#useradd user1
#smbpasswd -a user1
Enter Samba password: 123
Reenter samba password: 123
#smbpasswd -e user1
Restart the service
#service network restart
#chkconfig smb on
Client Side:
In Microsoft operating sytem,
OS : windows xp
Linux samba Server IP : 192.168.1.254
Start -> Run -> \\192.168.1.254
Username: user1
password: 123
My network places –> Properties –> Entire network –> Workgroup –> MS Windows
To view the shared directory to client from server.
#smbclient //serverIP(or)share name -u username
#smbclient -L serverIP -u username






I like this web site very much so much superb information.