Chinaunix首页 | 论坛 | 博客
  • 博客访问: 368143
  • 博文数量: 82
  • 博客积分: 4149
  • 博客等级: 上校
  • 技术积分: 1415
  • 用 户 组: 普通用户
  • 注册时间: 2007-08-28 13:38
文章分类

全部博文(82)

分类: LINUX

2008-04-15 10:12:52

你可以编辑/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 再试试看

阅读(1165) | 评论(0) | 转发(0) |
0

上一篇:MRTG

下一篇:Michael Jackson

给主人留下些什么吧!~~