业余编程爱好者
分类: LINUX
2010-07-21 22:15:27
rpm -qa | grep samba |
setenforce 0 |
useradd xiaohong passwd xiaohong smbpasswd -a xiaohong //此步为添加Samba用户 |
cat /etc/passwd | mksmbpasswd.sh > /etc/samba/smbpasswd |
vi smb.conf workgroup = WORKGROUP //工作组名称 [xiaohong] comment = xiaohong path = /var/samba/xiaohong public = yes writable = yes |
mkdir -p /var/samba/xiaohong chown xiaohong:xiaohong /var/samba/xiaohong //由于只能让xiaohong使用,所以得给该文件夹设置访问权限. chmod 700 /var/samba/xiaohong // 此时该文件夹属于xiaohong用户,并且只能由xiaohong用户访问. |
testparm //测试
service smb start pstree | grep mbd //查看是否启动 |