不驗證訪問samba
[root@xxzx ~]# service iptables stop#關閉防火牆 [root@xxzx ~]# vi /etc/selinux/config#關閉selinux安全 SELINUX=disabled [root@xxzx ~]# setenforce 0 [root@xxzx ~]# yum -y install samba samba-client samba-swat#安裝samba相關軟件 [root@xxzx ~]# vi /etc/samba/smb.conf # ----------------------- Network Related Options ------------------------- workgroup = MYGROUP#更改羣組名稱 #============================ Share Definitions ============================== [public] comment = Public Stuff path = /share#共享路徑 public = yes [root@xxzx /]# mkdir /share [root@xxzx /]# cd share/ [root@xxzx share]# touch samba.txt [root@xxzx share]# touch aa.txt [root@xxzx /]# chown -R nobody:nobody share/ [root@xxzx /]# service smb restart
2.單羣組
[root@xxzx ~]# groupadd ts [root@xxzx ~]# useradd -g ts test1 [root@xxzx ~]# useradd -g ts test2 [root@xxzx ~]# passwd test1 [root@xxzx ~]# passwd test2 [root@xxzx ~]# mkdir /ts [root@xxzx ~]# touch /ts/ceshi.txt [root@xxzx ~]# yum install samba samba-client samba-swat [root@xxzx ~]# smbpasswd test1 [root@xxzx ~]# smbpasswd test2 [root@xxzx ~]# vi /etc/samba/smb.conf # ----------------------- Network Related Options ------------------------- workgroup = MYGROUP#更改羣組名稱 #============================ Share Definitions ============================== [public] comment = Public Stuff path = /share#共享路徑 public = yes [ts] comment = TS path = /ts valid users = @ts [root@xxzx ~]# service smb restart