当前位置: 技术问答>linux和unix
利用smbclient打包中文文件夹失败的问题
来源: 互联网 发布时间:2015-11-27
本文导语: 系统为RHE3, 环境已设成中文,利用samba命令上传下载删除中文文件都没有问题,但在利用smbclient命令打包下载中文文件夹却出错。 例如用 smbclient //mypc/myshare "" -N -Tc backup.tar users/testfolder ...
系统为RHE3, 环境已设成中文,利用samba命令上传下载删除中文文件都没有问题,但在利用smbclient命令打包下载中文文件夹却出错。
例如用
smbclient //mypc/myshare "" -N -Tc backup.tar users/testfolder
打包下载testfolder文件夹没有问题。
但如果用
smbclient //mypc/myshare "" -N -Tc backup.tar users/测试文件夹
却报错。
这是否为smbclient的一个BUG啊,或者是我的配置文件有问题?有哪位知道么,非常感谢!!!
我的smb.conf如下
# Samba config file created using SWAT
# from localhost.localdomain (127.0.0.1)
# Date: 2006/05/08 15:35:28
# Global parameters
[global]
public = Yes
browseable = Yes
lm announce = Yes
browse list = Yes
auto services = Yes
workgroup = WORKGROUP
netbios name = SSL Server
server string = SMBServer
encrypt passwords = Yes
obey pam restrictions = Yes
pam password change = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *New*password* %nn *Retype*new*password* %nn *passwd:*all*authentication*tokens*updated*successfully*
username map = /etc/samba/smbusers
unix password sync = Yes
log file = /var/log/samba/%m.log
max log size = 50
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
dns proxy = No
hosts allow = All
block size = 4000
security = share
printing = cups
dos charset = cp936
unix charset = cp936
display charset = cp936
[homes]
comment = Home Directories
path = /home/%U
valid users = %S
read only = No
create mask = 0664
directory mask = 0775
writeable = yes
browseable = yes
guest ok = no
public = no
create mode = 0777
local master =yes
domain master = yes
[printers]
comment = All Printers
path = /var/spool/samba
guest ok = Yes
printable = Yes
browseable = No
[public]
comment = Public Areas
path = /home/public
read only = No
writable = yes
guest ok = Yes
[user]
comment = Read-Only Areas
path = /home/user
read only = No
guest ok = Yes
例如用
smbclient //mypc/myshare "" -N -Tc backup.tar users/testfolder
打包下载testfolder文件夹没有问题。
但如果用
smbclient //mypc/myshare "" -N -Tc backup.tar users/测试文件夹
却报错。
这是否为smbclient的一个BUG啊,或者是我的配置文件有问题?有哪位知道么,非常感谢!!!
我的smb.conf如下
# Samba config file created using SWAT
# from localhost.localdomain (127.0.0.1)
# Date: 2006/05/08 15:35:28
# Global parameters
[global]
public = Yes
browseable = Yes
lm announce = Yes
browse list = Yes
auto services = Yes
workgroup = WORKGROUP
netbios name = SSL Server
server string = SMBServer
encrypt passwords = Yes
obey pam restrictions = Yes
pam password change = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *New*password* %nn *Retype*new*password* %nn *passwd:*all*authentication*tokens*updated*successfully*
username map = /etc/samba/smbusers
unix password sync = Yes
log file = /var/log/samba/%m.log
max log size = 50
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
dns proxy = No
hosts allow = All
block size = 4000
security = share
printing = cups
dos charset = cp936
unix charset = cp936
display charset = cp936
[homes]
comment = Home Directories
path = /home/%U
valid users = %S
read only = No
create mask = 0664
directory mask = 0775
writeable = yes
browseable = yes
guest ok = no
public = no
create mode = 0777
local master =yes
domain master = yes
[printers]
comment = All Printers
path = /var/spool/samba
guest ok = Yes
printable = Yes
browseable = No
[public]
comment = Public Areas
path = /home/public
read only = No
writable = yes
guest ok = Yes
[user]
comment = Read-Only Areas
path = /home/user
read only = No
guest ok = Yes
|
你直接用smbclient //mypc/myshare "" -N -c 是否可以对中文目录运行命令?
不行的话用ssh也可以实现相同的功能:运行远端命令,也不用输密码
不行的话用ssh也可以实现相同的功能:运行远端命令,也不用输密码