Samba file sharing service
Service features: cross-platform file sharing
1. Environment DeploymentIp=192.168.1.50[[email protected] packages]# RPM-IVH samba-3.6.9-164.el6.x86_64.rpm
2. Building Samba ServicesTwo sharing modes: Anonymous share [global] workgroup = MyGroup Server string = Samba server Version%v log file =/var/log/s Amba/log.%m Max log size = Security =SharePassdb backend = Tdbsam load printers = yes cups options = raw[homes] Comment = Home directories browseable = no writable = yes [printers] comment = all printers Path =/var/spool/samba BR Owseable = no guest OK = no writable = no printable = yes[Share]Path=/sharePublic=yesRead Only=yesTesting access to shares using Windows client
Share required for user authentication 1) Create a shared authentication user Useradd Faker--Create System User Useradd Sherlock--Create System User Pdbedit-a-U faker-Add as Samba shared user pdbedit-a-U Sherlock --Add a shared user pdbedit-l for Samba--See all Samba users 2) Create a shared directory [[email protected]/]# mkdir/sherlock[[email protected]/]# Touch/sherlo CK/SHERLOCK.TXT3) Set User access authorization [[email protected]/]# Vi/etc/samba/smb.conf[global] workgroup = mygroup Server St Ring = Samba Server Version%v log file =/var/log/samba/log.%m Max log size = Security =UserPassdb backend = Tdbsam load printers = yes cups options = raw[Tools]Path=/sherlockPublic=noRead Only=yesvalid Users=faker,sherlockWrite List=faker4) Set Directory access authorization [[email protected]/]# chmod 777/sherlock[[email protected]/]# Vi/etc/samba/smb.conf[tools]Directory mask=0755--The default permission to upload a directory is 0755Create mask=0644--The default permission to upload files is 0644
3. Create User Mappings[Email protected]/]# vi/etc/samba/smbusersFAKER=QWE,QQQ--Specify the alias of user faker [[email protected]/]# Vi/etc/samba/smb.conf[global]username Map=/etc/samba/smbusers--Specify user mapping file [[email protected]/]# service SMB Restart--restart services PS: Blue for modified part, red for add part
Linux--smba Service Building