Close
Social profiles

Samba_Server

Linux Samba Server is a strong network service for file and print sharing that works on the majority of operating systems available today.

Configure a authenticated share using samba server

Now you have to Create a user called “tecexpertz” and a group called “smbgroup”. Add the user “tecexpertz” to the group “smbgroup”

[root@storage ~]# useradd tecexpertz
[root@storage ~]# groupadd smbgroup 
[root@storage ~]# usermod -a -G smbgroup tecexpertz
[root@storage ~]# smbpasswd -a tecexpertz
New SMB password: 
Retype new SMB password: 
Added user tecexpertz.

Create a new share called “/samba/TestShare2″ and set the permissions to that share.

[root@storage ~]# mkdir /samba/TestShare2
[root@storage ~]# chmod -R 0755 /samba/TestShare2/ 
[root@storage ~]# chown -R sk:smbgroup /samba/TestShare2/

Add the below lines at the bottom of samba config file.

[root@storage ~]# vi /etc/samba/smb.conf 
[secure] 
path = /samba/TestShare2
writable = yes 
browsable = yes 
guest ok = no 
valid users = @smbgroup

Test the configuration for any errors

[root@sambaserver ~]# testparm

Restart samba server

[root@storage ~]# /etc/init.d/smb restart 
Shutting down SMB services: [ OK ] 
Starting SMB services: [ OK ] 
[root@storage ~]# /etc/init.d/nmb restart 
Shutting down NMB services: [ OK ] 
Starting NMB services: [ OK ]

Now go to the samba server from the windows PC and try to access the secured share.

Leave a Reply

Your email address will not be published. Required fields are marked *

Close