Samba File Share Service

linux

Install and start samba server:

# yum install samba

# service smb start

# chkconfig smb on

 

Add users and group:

# useradd user01

# passwd user01

# useradd user02

# passwd user02

# groupadd testusers

Add both users in the group testusers

# smbpasswd -a user01

# smbpasswd -a user02

 

Create a folder to be shared:

# mkdir /shared_folder

# chown root.testusers /shared_folder

 

# mkdir /shared_folder/user01

# chown user01.testusers /shared_folder/user01

 

# mkdir /shared_folder/user02

# chown user02.testusers /shared_folder/user02

 

Add the follwing in a default samba configuration file /etc/samba/smb.conf :

[shared_folder]
comment = Shared Folder
path = /shared_folder/%U
writable = yes
guest ok = no

 

Test the configuration:

# service smb restart

Go to the windows client machine and click on Start --> Run --> Now type “\\<ip address of samba server>”

You should get a login box.