你可以编辑/etc/samba/smb.conf
#============================ Share Definitions ==============================
[share]
guest account = abc
comment = share
public = yes
path = /tmp/share
# deny hosts = 10.0.0.
# guest ok = yes
# writeable = no
# browseable = yes
自己选择要注释掉的选项
再来看smb的设定
smbpasswd --help
smbpasswd: invalid option -- -
When run by root:
smbpasswd [options] [username] [password]
otherwise:
smbpasswd [options] [password]
Version: 2.2.7a
options:
-L local mode (must be first option)
-h print this usage message
-s use stdin for password prompt
-c smb.conf file Use the given path to the smb.conf file
-D LEVEL debug level
-r MACHINE remote machine
-U USER remote username
extra options when run by root or in local mode:
-a add user
-d disable user
-e enable user
-m machine trust account
-n set no password
-x delete user
-j DOMAIN join domain name
-t DOMAIN change trust account password on domain
-S DOMAIN Retrieve the domain SID for DOMAIN
-R ORDER name resolve order
举例:
[root@sjb root]# smbpasswd -a abc
New SMB password:
Retype new SMB password:
Added user abc.
解释:
先建立系统用户
useradd username
passwd username
然后把系统用户加入到smb账户数据库中(这一步有的linux免了)
smbadduser username:smbba
/etc/init.d/smb restart 再试试看
阅读(1203) | 评论(0) | 转发(0) |