1.安装samba
yum install samba
2.配置root用户访问所有文件
可以导入系统账户信息到samba:
cat /etc/passwd | mksmbpasswd.sh > /etc/samba/smbpasswd
也可以把root账号导入,并设置密码为空:
smbpasswd -a root
两个回车。然后修改/etc/samba/smb.conf,在文件最后加入:
[all file]
comment = centos all file
path = /
valid users = root
public = no
writable = yes
printable = no
create mask = 0777
directory mask = 0777
重启samba:
service smb restart