Ubuntu 下建立samba共享不能访问

347 views
Skip to first unread message

Wayne Guo

unread,
Aug 1, 2011, 3:59:50 AM8/1/11
to sh...@googlegroups.com
共享文件夹是src,Ubuntu 10.10下用nautilus 右键直接添加的,允许匿名登录
已经把文件夹搞成mode 777, 确认是有权限的

用smbclient看了一下
$smbclient //10.33.33.9/src 
Enter oneyoung's password: 
Anonymous login successful
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.5.4]
tree connect failed: NT_STATUS_BAD_NETWORK_NAME  

一直显示NT_STATUS_BAD_NETWORK_NAME
网上有一种说法是开了selinux,但是我的机子上没有开

我还把samba所有的东西pruge了一遍,然后再安装,之后情况还是这样
这是神马原因呢?

源泉星火(张明源)

unread,
Aug 1, 2011, 4:11:23 AM8/1/11
to sh...@googlegroups.com
samba server的日志呢?
--
明源
http://www.Linuxzh.org
Twitter: @muxueqz

Wayne Guo

unread,
Aug 1, 2011, 4:16:36 AM8/1/11
to sh...@googlegroups.com
$for i in `ls log.*`; do echo "==================$i============================="; cat $i; done
==================log.10.33.33.9=============================
==================log.127.0.0.1=============================
==================log.__ffff_10.33.33.9=============================
==================log.__ffff_127.0.0.1=============================
==================log.nmbd=============================
[2011/08/01 15:42:32,  0] nmbd/nmbd.c:857(main)
  nmbd version 3.5.4 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2010
[2011/08/01 15:48:51.618892,  0] nmbd/nmbd.c:71(terminate)
  Got SIGTERM: going down...
[2011/08/01 15:49:55,  0] nmbd/nmbd.c:857(main)
  nmbd version 3.5.4 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2010
==================log.oneyoung=============================
[2011/08/01 15:44:49.600635,  0] param/loadparm.c:8686(process_usershare_file)
  process_usershare_file: stat of /var/lib/samba/usershares/marvell-src failed. Permission denied
[2011/08/01 15:44:49.601260,  0] smbd/service.c:988(make_connection_snum)
  canonicalize_connect_path failed for service marvell-src, path /home/oneyoung/android/marvell/marvell-src
[2011/08/01 15:44:51.687296,  1] smbd/service.c:678(make_connection_snum)
  create_connection_server_info failed: NT_STATUS_ACCESS_DENIED
[2011/08/01 15:44:52.972526,  1] smbd/service.c:678(make_connection_snum)
  create_connection_server_info failed: NT_STATUS_ACCESS_DENIED
[2011/08/01 15:44:53.004983,  1] smbd/service.c:678(make_connection_snum)
  create_connection_server_info failed: NT_STATUS_ACCESS_DENIED
[2011/08/01 15:44:54.044232,  1] smbd/service.c:678(make_connection_snum)
  create_connection_server_info failed: NT_STATUS_ACCESS_DENIED
[2011/08/01 15:44:55.033515,  0] param/loadparm.c:8686(process_usershare_file)
  process_usershare_file: stat of /var/lib/samba/usershares/marvell-src failed. Permission denied
[2011/08/01 15:44:55.034340,  0] smbd/service.c:988(make_connection_snum)
  canonicalize_connect_path failed for service marvell-src, path /home/oneyoung/android/marvell/marvell-src
[2011/08/01 15:44:57.188487,  0] param/loadparm.c:8686(process_usershare_file)
  process_usershare_file: stat of /var/lib/samba/usershares/marvell-src failed. Permission denied
[2011/08/01 15:44:57.189302,  0] smbd/service.c:988(make_connection_snum)
  canonicalize_connect_path failed for service marvell-src, path /home/oneyoung/android/marvell/marvell-src
[2011/08/01 15:44:59.507263,  0] param/loadparm.c:8686(process_usershare_file)
  process_usershare_file: stat of /var/lib/samba/usershares/marvell-src failed. Permission denied
[2011/08/01 15:44:59.508080,  0] smbd/service.c:988(make_connection_snum)
  canonicalize_connect_path failed for service marvell-src, path /home/oneyoung/android/marvell/marvell-src
[2011/08/01 15:45:09.390906,  0] param/loadparm.c:8686(process_usershare_file)
  process_usershare_file: stat of /var/lib/samba/usershares/marvell-src failed. Permission denied
[2011/08/01 15:45:09.391327,  1] smbd/service.c:678(make_connection_snum)
  create_connection_server_info failed: NT_STATUS_ACCESS_DENIED
[2011/08/01 15:45:28.634437,  0] param/loadparm.c:8686(process_usershare_file)
  process_usershare_file: stat of /var/lib/samba/usershares/marvell-src failed. Permission denied
[2011/08/01 15:45:28.634950,  1] smbd/service.c:678(make_connection_snum)
  create_connection_server_info failed: NT_STATUS_ACCESS_DENIED
[2011/08/01 15:45:28.669124,  0] param/loadparm.c:8686(process_usershare_file)
  process_usershare_file: stat of /var/lib/samba/usershares/marvell-src failed. Permission denied
[2011/08/01 15:45:28.669552,  1] smbd/service.c:678(make_connection_snum)
  create_connection_server_info failed: NT_STATUS_ACCESS_DENIED
[2011/08/01 15:45:29.561987,  0] param/loadparm.c:8686(process_usershare_file)
  process_usershare_file: stat of /var/lib/samba/usershares/marvell-src failed. Permission denied
[2011/08/01 15:45:29.562486,  1] smbd/service.c:678(make_connection_snum)
  create_connection_server_info failed: NT_STATUS_ACCESS_DENIED
[2011/08/01 15:51:17.286785,  0] param/loadparm.c:8686(process_usershare_file)
  process_usershare_file: stat of /var/lib/samba/usershares/marvell-src failed. Permission denied
[2011/08/01 15:51:17.305748,  0] smbd/service.c:988(make_connection_snum)
  canonicalize_connect_path failed for service marvell-src, path /home/oneyoung/android/marvell/marvell-src
[2011/08/01 15:51:18.286320,  0] param/loadparm.c:8686(process_usershare_file)
  process_usershare_file: stat of /var/lib/samba/usershares/marvell-src failed. Permission denied
[2011/08/01 15:51:18.287158,  0] smbd/service.c:988(make_connection_snum)
  canonicalize_connect_path failed for service marvell-src, path /home/oneyoung/android/marvell/marvell-src
[2011/08/01 15:51:18.582256,  0] param/loadparm.c:8686(process_usershare_file)
  process_usershare_file: stat of /var/lib/samba/usershares/marvell-src failed. Permission denied
[2011/08/01 15:51:18.583131,  0] smbd/service.c:988(make_connection_snum)
  canonicalize_connect_path failed for service marvell-src, path /home/oneyoung/android/marvell/marvell-src
[2011/08/01 15:51:42.299090,  0] param/loadparm.c:8686(process_usershare_file)
  process_usershare_file: stat of /var/lib/samba/usershares/marvell-src failed. Permission denied
[2011/08/01 15:51:42.299914,  0] smbd/service.c:988(make_connection_snum)
  canonicalize_connect_path failed for service marvell-src, path /home/oneyoung/android/marvell/marvell-src
==================log.smbd=============================
[2011/08/01 15:42:32,  0] smbd/server.c:1123(main)
  smbd version 3.5.4 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2010
[2011/08/01 15:42:32.361836,  0] smbd/server.c:1169(main)
  standard input is not a socket, assuming -D option
[2011/08/01 15:49:49,  0] smbd/server.c:1123(main)
  smbd version 3.5.4 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2010
[2011/08/01 15:49:49.321627,  0] printing/print_cups.c:108(cups_connect)
  Unable to connect to CUPS server localhost:631 - Connection refused
[2011/08/01 15:49:49.323848,  0] printing/print_cups.c:108(cups_connect)
  Unable to connect to CUPS server localhost:631 - Connection refused
[2011/08/01 15:49:49.396409,  0] smbd/server.c:1169(main)
  standard input is not a socket, assuming -D option
[2011/08/01 15:49:50.861133,  0] smbd/server.c:500(smbd_open_one_socket)
  smbd_open_once_socket: open_socket_in: Address already in use
[2011/08/01 15:49:50.861215,  0] smbd/server.c:500(smbd_open_one_socket)
  smbd_open_once_socket: open_socket_in: Address already in use
[2011/08/01 15:49:51.206491,  1] smbd/process.c:776(smbd_sig_hup_handler)
  Reloading services after SIGHUP
[2011/08/01 15:49:51.210213,  0] smbd/server.c:281(remove_child_pid)
  Could not find child 1316 -- ignoring

david pu

unread,
Aug 1, 2011, 6:03:37 AM8/1/11
to sh...@googlegroups.com
这个权限和目录777没关系吧?贴下/etc/samba/smb.conf。这个里面directory mask是多少?

2011/8/1 Wayne Guo <guowa...@gmail.com>:

--
() ASCII Ribbon Campaign
/\ Keep it simple!

Wayne Guo

unread,
Aug 1, 2011, 6:23:13 AM8/1/11
to sh...@googlegroups.com
通过nautilus 右键加的
好像没有这个entry
----------------------------------------------------------------------------------------------------------------------------------------------------------
[global]
   workgroup = workgroup
   server string = %h server (Samba, Ubuntu)
   dns proxy = no
   log file = /var/log/samba/log.%m
   max log size = 1000
   syslog = 0
   panic action = /usr/share/samba/panic-action %d
   encrypt passwords = true
   passdb backend = tdbsam
   obey pam restrictions = yes
   unix password sync = yes
   passwd program = /usr/bin/passwd %u
   passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
   pam password change = yes
   map to guest = bad user
   usershare allow guests = yes
[printers]
   comment = All Printers
   browseable = no
   path = /var/spool/samba
   printable = yes
   guest ok = no
   read only = yes
   create mask = 0700
[print$]
   comment = Printer Drivers
   path = /var/lib/samba/printers
   browseable = yes
   read only = yes
   guest ok = no

hengiQ

unread,
Aug 2, 2011, 1:18:44 AM8/2/11
to sh...@googlegroups.com
还是自己配一个吧,又不是很麻烦的事情。
用nautilus右键添加不是很靠谱的事情。
或者用网页方式的那个什么swat(我忘了,呵呵),也很方便啊

weibin li

unread,
Oct 20, 2011, 6:14:53 AM10/20/11
to sh...@googlegroups.com
好像日志里好多permission denied。。。。访问不到很多不是网络问题就是权限问题啦。呵呵
或者直接到命令提示符下面ls -ld 共享目录,看看权限。
--
-----------------------------------------------------------
Shanghai Linux User Group
Jacky.Li    
-----------------------------------------------------------

Reply all
Reply to author
Forward
0 new messages