更改/etc/smb.conf,主要确定下面的内容:
workgroup=MYWKGP
smb passwd file=/etc/smbpasswd
security=user(使用unix用户安全)
encrypt passwords= yes
然后就可以添加目录了,首先添加宿主目录:
(其实就是把对应的行的注释去掉)
[homes]
comment = home directory
browseable = no
writeable= yes
还可以再加一个共享目录:
[public]
comment = public directory
path=/public
public=yes
writeable=no
read only=yes
printable=no
最后当然是加入用户,比如想把fake用户当成windows系统中的winfake,执行
smbadduser fake:winfake
输入访问口令,以后在windows 98中只要提供winfake和对应口令就可以访问/home/fake和/public目录
有时windows 95/98会出现一些兼容问题,研究encrypt passwords=那一行吧
==================================================================
最好用swat来设置吧,把/etc/inet.conf最后swat前的注释去掉,然后重启
inetd,就可以通过任意一个机器用浏览器来配置了。
输入地址http://samba_server:901/即可
95/98/nt都可以的说,还好这里什么机器都有,嘿嘿,都可以互相访问的,包括打印,
95/98网络登录时要用samba里的用户名哦
[global]
workgroup = IPC
netbios name = DATASERVER
server string = Data Server - linux
encrypt passwords = Yes
log file = /var/log/samba/log.%m
max log size = 50
#这三行设置超时,还没搞清楚,不过这样马马虎虎能工作,一定要设
#否则mount上的设备umount不掉,一直busy的说,icon_razz.gifP
change notify timeout = 30
deadtime = 1
keepalive = 0
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
dns proxy = no
#这三行是umask的设置,看情况设置吧
create mask = 0755
force create mode = 0755
force directory mode = 0755
#用户的home目录,根据用户不同而变化,本来就有的,不是我加的说
[homes]
comment = Home Directories
read only = No
browseable = No
[printers]
comment = All Printers
path = /var/spool/samba
print ok = Yes
browseable = No
#我自己加的一个共享目录
[public]
comment = Public Software
path = /home/ftp/pub
guest ok = Yes