zhaosi 回复于:2003-11-19 18:31:47 |
注释很清楚,不错,只是繁体看起来不方便。
|
feiwupiaoxue 回复于:2003-11-19 20:11:57 |
好﹐Smb.conf文件配置完成。接下来就要手动在/home下建立目录﹕ profiles,访问权限为0770,组为你想要建立的组﹐比如share. 用来存放Windows用户的配置文件。 netlogon访问权限为1750﹐这里加上了sticky选项﹐不允许其它用户删除目录里的文件﹐只有超级用户或者建立者才可以﹐注意sticky选项只对目录起作用。组为share。 下面建立/etc/samba下面的smbpasswd文件﹕ # cat /etc/passwd | mksmbpasswd.sh > /etc/samba/smbpasswd 为了安全起见﹐设置权限﹕ #cd /etc #chmod 500 samba #cd samba #chmod 600 smbapsswd
接下来大家可以在netlogon目录里建立windows用户的登录脚本﹐比如批处理文件﹐需要注意的是﹐一定要在Windows下面建立﹐因为如果在Linux下建立﹐那幺Windows就不会执行Linux的文件。比如有个帐户feixue,批处理文件可以这样﹕ feixue.bat内容为﹕ @net time //SambaServer /set /yes @net use H: //SambaServer/feixue -y @regedit -s //SambaServer/netlogon/*.reg 等。
需要注意的是把批处理文件保存到netlogon下面后一定要检查文件的权限﹐修正后用户才会执行﹐不然的话嘿嘿﹐你有麻烦了﹗﹗﹗
如何配置Windows端登录Samba域﹐对于98来说﹐很容易﹐在网络属性里选 Client for microsoft networks﹐在第一项打勾﹐下面输入你的Samba服务器的域名(工作组).重新激活机器以后﹐邓入对话框就会有三项﹕用户名﹑密码﹑域名。 NT/2000下面登录samba域会困难一点﹐首先你要在Samba服务器上建立windowsNT/2000机器的信用帐号。 下面以一个计算器名为test的计算机为例﹕ #useradd -c 'Test Compter' -d /dev/null -g share -s /bin/false -r test$ 我们创建了一个Linux本地帐号﹐出于安全的考虑不需要它登录到Linux进行任何操作﹐因此的用户目录为/dev/null,shell是/bin/false. 然后我们就可以用smbpasswd创建相应的Samba机器帐号﹕ #smbpasswd -a -m test 其中-a是添加﹐-m是机器信任帐号。这样﹐依据test$的Linux帐号创建了一个NT域的机器信任帐号test. 然后在windowsNT/2000上加入Samba域﹐根据提示输入超级用户的用户名称和密码﹐就可以加入Samba域了。 重新激活机器以后﹐就会有三个选项了﹐比如用原先建立的用户feixue邓入即可。
好了﹐到此为止﹗
有时间我再加上Samba打印共享的方法
祝你好运﹗﹗﹗ 有什幺问题大家可以和我一快儿交流交流 :lol:
|
feiwupiaoxue 回复于:2003-11-19 21:34:38 |
好了﹐现在看起来怎幺样﹐不好意思﹐因为我的系统是繁体的﹐现在我把文章改为简体了﹐满意了吧﹐呵呵﹗﹗﹗ :lol:
|
simplelove 回复于:2003-11-19 22:47:30 |
非常满意,呵呵
感谢 feiwupiaoxue
|
yama998 回复于:2003-11-19 23:06:18 |
很好,收下了,謝謝Feiwupiaoxue,置頂!!!!!
|
robert2000 回复于:2003-11-20 09:40:59 |
不錯呀!但是我設有samba 密碼卻不用輸入用戶和密碼就都可以進,有沒有辦法解決呀?多謝!
|
daisy_chi 回复于:2003-11-20 09:50:00 |
支持一下
|
好好先生 回复于:2003-11-20 10:26:31 |
[quote:22edfc4a26="robert2000"]不錯呀!但是我設有samba 密碼卻不用輸入用戶和密碼就都可以進,有沒有辦法解決呀?多謝![/quote:22edfc4a26] vi /etc/samba/smb.conf /security 修改为security=user servce smb restart一下。 看看结果
|
cgweb 回复于:2003-11-20 10:29:24 |
feiwupiaoxue,谢谢,写的好呀!
|
webfox 回复于:2003-11-20 14:52:07 |
这个我都试过可以成功,但在windowsxp或者win2003下登陆就不可以,不知道为什么?楼主有什么办法可以解决吗?听说xp以上版本的windows的域和以前有点不同。
|
feiwupiaoxue 回复于:2003-11-20 23:18:15 |
很不好意思,在2003和XP下面我沒有試過,有時間一定解決這個問題,我想應該是差不多吧,呵呵!!!
|
原著精華 回复于:2003-11-20 23:25:24 |
十分感謝!!!
|
llzqq 回复于:2003-11-21 00:10:47 |
PIC
|
apile 回复于:2003-11-21 08:16:31 |
請問一下,你怎麼處理中文字問題???? 我先前用tarball安裝過..但是碰到中文字就完了... 原本我有個samba server 2.2 可以設置cp950的codepage.. 但是裝上samba 3.0後,原本的中文目錄全部變成亂碼.. 但是新建立的目錄,還是看得到中文... 看網上的一堆文章...說得都是unicode與big5的問題... CP437.so CP850.so 他的samba/lib/charset中只有這兩個 codepage... 不知道有沒有那位老大...知道怎麼加入 其他的CPXXX.so...???? 所以後來不得以我還是用samba 2.2版本...
|
tiansgx 回复于:2003-11-21 09:37:11 |
继续关注ing
|
llzqq 回复于:2003-11-21 10:38:46 |
MY SMB.CONF
#======================= Global Settings ===================================== [global]
# workgroup = NT-Domain-Name or Workgroup-Name workgroup = redhat netbios name = home # server string is the equivalent of the NT Description field server string = Samba Server %v
# This option is important for security. It allows you to restrict # connections to machines which are on your local network. The # following example restricts access to two C class networks and # the "loopback" interface. For more examples of the syntax see # the smb.conf man page hosts allow = 192.168.0.0/255.255.255.0
# this tells Samba to use a separate log file for each machine # that connects log file = /var/log/samba/%m.log
# Put a capping on the size of the log files (in Kb). max log size = 50
# Security mode. Most people will want user level security. See # security_level.txt for details. security = user
# You may wish to use password encryption. Please read # ENCRYPTION.txt, Win95.txt and WinNT.txt in the Samba documentation. # Do not enable this option unless you have read those documents encrypt passwords = yes smb passwd file = /etc/samba/smbpasswd
# The following are needed to allow password changing from Windows to # update the Linux system password also. # NOTE: Use these with 'encrypt passwords' and 'smb passwd file' above. # NOTE2: You do NOT need these to allow workstations to change only # the encrypted SMB passwords. They allow the Unix password # to be kept in sync with the SMB password. unix password sync = Yes passwd program = /usr/bin/passwd %u passwd chat = *New*UNIX*password* %n/n *ReType*new*UNIX*password* %n/n
*passwd:*all*authentication*tokens*updated*successfully*
# Unix users can map to different SMB User names username map = /etc/samba/smbusers map to guest = bad user
# Using the following line enables you to customise your configuration # on a per machine basis. The %m gets replaced with the netbios name # of the machine that is connecting include = /etc/samba/smb.conf.%m
# Most people will find that this option gives better performance. # See speed.txt and the manual pages for details socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
# Browser Control Options: # set local master to no if you don't want Samba to become a master # browser on your network. Otherwise the normal election rules apply local master = yes
# OS Level determines the precedence of this server in master browser # elections. The default value should be reasonable os level = 65
# Domain Master specifies Samba to be the Domain Master Browser. This # allows Samba to collate browse lists between subnets. Don't use this # if you already have a Windows NT domain controller doing this job domain master = yes
# Preferred Master causes Samba to force a local browser election on startup # and gives it a slightly higher chance of winning the election preferred master = yes
# Enable this if you want Samba to be a domain logon server for # Windows95 workstations. domain logons = yes
# if you enable domain logons then you may want a per-machine or # per user logon script # run a specific logon batch file per workstation (machine) ; logon script = scripts%m.bat # run a specific logon batch file per username logon script = scripts%U.bat
# Where to store roving profiles (only for Win95 and WinNT) # %L substitutes for this servers netbios name, %U is username # You must uncomment the [Profiles] share below logon path = //%L/Profiles/%U logon drive = H:
# Windows Internet Name Serving Support Section: # WINS Support - Tells the NMBD component of Samba to enable it's WINS Server wins support = yes
# WINS Proxy - Tells Samba to answer name resolution queries on # behalf of a non WINS capable client, for this to work there must be # at least one WINS Server on the network. The default is NO. wins proxy = yes
admin users = root
#============================ Share Definitions ============================== [homes] comment = Home Directories browseable = no read only = no # If you want users samba doesn't recognize to be mapped to a guest user ; map to guest = bad user
# Un-comment the following and create the netlogon directory for Domain Logons [netlogon] comment = Network Logon Service path = /home/netlogon guest ok = yes write list = root share modes = no
# Un-comment the following to provide a specific roving profile share # the default is to use the user's home directory [Profiles] path = /home/profiles read only = no create mask = 0770 force create mode = 0770 security mask = 0770 force security mode = 0770 directory mask = 0770 force directory mode = 0770 browseable = no
|
llzqq 回复于:2003-11-21 10:40:43 |
谁碰到了和我一样的问题,还请多多交流!!
|
webfox 回复于:2003-11-21 12:00:44 |
llzqq 你试试加入 add user script = /usr/sbin/useradd -d /dev/null -g 100 -s /bin/false -M%u 有谁知道xp和win2003为什么不能域登陆到samba吗?
|
carrison 回复于:2003-11-21 12:28:27 |
好文!
|
llzqq 回复于:2003-11-21 17:53:14 |
经过不歇的努力终于成功了
|
ahakka 回复于:2003-11-21 18:18:34 |
[quote:5e37357cf0="webfox"]llzqq 你试试加入 add user script = /usr/sbin/useradd -d /dev/null -g 100 -s /bin/false -M%u 有谁知道xp和win2003为什么不能域登陆到samba吗?[/quote:5e37357cf0]
请将这个文件在XP或2003下执行一下:
/usr/share/doc/samba-3.0.0/docs/Registry/WinXP_SignOrSeal.reg
我曾经在SAMBA-2.8.0下面,让WINXP登录SAMBA域,就用上面的补丁,成功通过。我想SAMBA-3.0也应该是这个问题。大家可以试。。。。
顺便说一下,这篇文章真不错!
|
qdreal 回复于:2003-11-23 13:28:44 |
good , perfect!
|
llzqq 回复于:2003-11-23 14:50:26 |
我发现客户端用户不能修改他们的登陆密码,有人能解决吗?
|
robert2000 回复于:2003-11-24 18:02:51 |
好好先生說: vi /etc/samba/smb.conf /security 修改为security=user servce smb restart一下。 看看结果
都有修改的,但是不用密還可以進,真不明呀!還有沒有其它原因呢?多謝!
|
llzqq 回复于:2003-11-24 18:50:50 |
你的客户机上是否有和LINUX上相同帐户和密码
|
robert2000 回复于:2003-11-26 11:05:41 |
沒有呀,都是不同的,,
|
panwj 回复于:2003-11-26 11:56:51 |
必须是ADMIN用户才能把计算机加入SAMBA域
|
feiwupiaoxue 回复于:2003-11-28 10:43:03 |
大家可以把从网上当下来的注册表的文件倒入注册表中就可以了,nt/2000登入到域中去一定要用到超级用户的名称和密码(root,***),还有字符集samba使用的是utf-8,并没有象原来的那样 使用: client code page = 950或者936之类的呵呵!!!
|
llzqq 回复于:2003-11-28 14:40:31 |
普通用户不能修改自己的密码(按Ctrl+Alt+Del键)
|
robert2000 回复于:2003-12-01 16:31:30 |
oh
|
xueada 回复于:2003-12-01 17:18:40 |
关于samba3的中文问题,试试在smb.conf 全局区加:display charset = cp936,我机器(fedora+samba3)上是这么解决的
在/usr/share/samba/codepages里有关于cp936的页文件,只不过samba3的配置文件中关于character的关键字变了
|
eagerlinuxer 回复于:2003-12-01 22:21:09 |
写得真是很好,我想问楼主一个也许于此无关的问题:如何把一台linux的samba服务器加入到一个WIN2000域中,做一个WIN2000域中的文件服务器呢?有什么办法?
|
garycn 回复于:2003-12-17 16:53:36 |
我想知道.bat文件用什么生成,有哪些规则呢?谢谢大家!
|
woodsbill 回复于:2004-02-03 16:53:17 |
samba3.0.1,windows域用户通过机器名访问samba服务器,无法通过验证,通过ip地址访问可以通过验证,本地用户可以通过域名访问,是什么原因? |