QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 845|回复: 4

访问网上共享资源,出现乱码!

[复制链接]
发表于 2005-7-1 17:06:45 | 显示全部楼层 |阅读模式
我安装RedHat9.0
我的smb.conf文件如下::::
=====================================
[global]

# workgroup = NT-Domain-Name or Workgroup-Name
   workgroup =Redhat

# server string is the equivalent of the NT Description field
   server string = from it02
   netbios name = IT02
     *
     *
     *
     *
# A publicly accessible directory, read/write to all users. Note that all files
# created in the directory by users will be owned by the default user, so
# any user with access can delete any other user's files. Obviously this
# directory must be writable by the default user. Another user could of course
# be specified, in which case all files would be owned by that user instead.
;[public]
;   path = /usr/somewhere/else/public
;   public = yes
;   only guest = yes
;   writable = yes
;   printable = no

# The following two entries demonstrate how to share a directory so that two
# users can place files there that will be owned by the specific users. In this
# setup, the directory should be writable by both users and should have the
# sticky bit set on it to prevent abuse. Obviously this could be extended to
# as many users as required.
;[myshare]
;   comment = Mary's and Fred's stuff
;   path = /usr/somewhere/shared
;path= /home/zht
;   valid users = mary fred
;   public = no
;   writable = yes
;   printable = no
;   create mask = 0765
[public]
path= /mnt/windows1
guest ok=yes
writable=yes


我想应该没什么错误!但是访问网上邻居资源的时候,显示乱码!
可能是什么原因呢?
 楼主| 发表于 2005-7-1 18:33:45 | 显示全部楼层
我载netbios name = IT02后面加上:
   

          cilent code page = 936
  重启smb
还是不行

回复

使用道具 举报

发表于 2005-7-1 21:21:09 | 显示全部楼层
[quote:aa9ae08e77="蚂蚁飞翔"]我载netbios name = IT02后面加上:
   

          cilent code page = 936
  重启smb
还是不行

![/quote]

具体的代码好像与版本有一点关系
回复

使用道具 举报

发表于 2005-8-18 16:57:10 | 显示全部楼层
可以试试这个:mount -t smbfs -o username=你要访问的机器的用户名 -o password=密码 -o codepage=936 //ip/sharefile /mnt/yourmountpoint
这个就可以看到windows操作里面的共享文件的中文名了。
回复

使用道具 举报

发表于 2005-8-18 20:50:40 | 显示全部楼层
是在global配置部分添加的吗?

还有就是samba的版本
(1)samba 2.2.x及以前版本
在/etc/samba/smb.conf文件的[global]中加上一行:

client codepage = 936

(2)samba 3+

unix charset = gb2312(或者UTF8,看系统编码而定,UTF8是默认的编码)
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-11-5 13:43 , Processed in 0.044372 second(s), 16 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表