- 不验证访问samba
[[email protected] ~]# service iptables stop#关闭防火墙 [[email protected] ~]# vi /etc/selinux/config#关闭selinux安全 SELINUX=disabled [[email protected] ~]# setenforce 0 [[email protected] ~]# yum -y install samba samba-client samba-swat#安装samba相关软件 [[email protected] ~]# vi /etc/samba/smb.conf # ----------------------- Network Related Options ------------------------- workgroup = MYGROUP#更改群组名称 #============================ Share Definitions ============================== [public] comment = Public Stuff path = /share#共享路径 public = yes [[email protected] /]# mkdir /share [[email protected] /]# cd share/ [[email protected] share]# touch samba.txt [[email protected] share]# touch aa.txt [[email protected] /]# chown -R nobody:nobody share/ [[email protected] /]# service smb restart
2.单群组
[[email protected] ~]# groupadd ts [[email protected] ~]# useradd -g ts test1 [[email protected] ~]# useradd -g ts test2 [[email protected] ~]# passwd test1 [[email protected] ~]# passwd test2 [[email protected] ~]# mkdir /ts [[email protected] ~]# touch /ts/ceshi.txt [[email protected] ~]# yum install samba samba-client samba-swat [[email protected] ~]# smbpasswd test1 [[email protected] ~]# smbpasswd test2 [[email protected] ~]# 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 [[email protected] ~]# service smb restart
时间: 2024-10-20 23:49:06