han1094
 samba server  设置
yum install samba.x86_64
systemctl start smb.service
systemctl enable smb.service

samba 使用系统用户共享(用户家目录  )
useradd -s /sbinlogin dafei
pdbedit -a dafei
useradd -s /sbinlogin xiaofu
pdbedit -a xiaofu
pdbedit -L #列出smb用户
pdbedit -x xiaofu #删除用户
smbpasswd sifei  #修改smb用户密码
systemctl restart smb.service
setsebool -P samba_enable_home_dirs on
pdbedit -c "[D]" -u tiantian && systemctl restart smb.service
pdbedit -c "[]" -u tiantian && systemctl restart smb.service


windows客户端直接使用uri路径访问即可。
\\192.168.1.27
net use * /delete  #清空windows缓存 

设置samba共享目录:
1 规划目录路径
mkdir /public
chown nobody:nobody /public

2 vi /etcmba/smb.conf  #参考书213页
[public]
comment = Public Stuff
path = /public/
public = yes
writable = yes
printable = no

    [pub2]
        comment = Public Stuff
        path = /pub2
        browseable = no
        public = yes
        writable = yes
        printable = no


semanage fcontext -a -t public_content_rw_t "/public"
restorecon -F -R -v /public/   #查看目录上下文的修改
ll -Z /public/ -d   #查看目录上下文的修改
setsebool -P smbd_anon_write 1  #设置匿名用户可写布尔值

分类:

技术点:

相关文章:

  • 2021-08-10
  • 2022-12-23
  • 2021-05-27
  • 2021-12-03
  • 2021-07-18
  • 2021-05-31
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-02-19
  • 2022-12-23
  • 2021-06-15
  • 2021-10-12
  • 2022-12-23
  • 2021-06-08
  • 2022-12-23
相关资源
相似解决方案