samba “The specified network name is no longer available” 出错的解决办法

关于samba的作用在这里我就不作详细的解说了,由于这几天重装了ubuntu14.04的系统,一些关于samba的配置文件都是之前配置好的,直接覆盖了现有的,跳过了繁琐的配置步骤,没想到出现了“


The specified network name is no longer available”这样的一个小问题,卸载,重新安装samba,又重新配置文件,问题依然存在,但是在windows下可以ping通samba服务器的IP地址,就是不能登陆进去查看文件,很是头疼...难过


在网上找了很多资料都不是很实用,直到看到了这篇文章,如果英语还可以且有兴趣的朋友可以看一下...

http://unix.stackexchange.com/questions/214128/samba-specified-network-name-no-longer-available/214129

如果你由于某些条件的限制不能打开此链接,我会在最后附录上这篇文章的内容,方便一些朋友微笑


我这边可能是由于一些依赖的库文件没有安装,才导致现在这样的错误,

$ sudo apt-get install --reinstall libsmbclient libsmbclient-dev libtevent0 libtalloc2
$ sudo service smbd restart

执行以上的指令就可以了吐舌头



附录内容:

SAMBA Specified Network Name no Longer Available


I've got a problem building a SAMBA share between two computers. One is on Windows 8, the other is on a custom Yocto made Linux. The SAMBA worked before, I don't understand why it does not anymore ...

The error message I get is the following : "\[IP]\SHARED is not accessible. You might not have permission to use this netwokr resource. Contact the administrator of this server to find out if you have access persmmissions. The specified network name is no longer available"

I'm ROOT on my Yocto

My SMB.CONF file (in /usr/local/samba/lib) looks like :

[global]
workroup = smb
security = share
share modes = yes
log file = /var/log/samba.log.%m

[homes]
comment = Home Directories
browsable = no
read only = no
create mode = 0750

[SHARED]
path = /media/ssd
public = yes
writable = yes
comment = smb share
printable = no
guest ok = yes

I've tryed the following :

    Changing the workgroup to WORKGROUP
    Start and restart SMBD and NMBD (with the -D option)
    Changing the cable and the interface (I've got two Ethernet entrances)
    Change permissions of the /media/ssd file to a maximum with chmod -R 777
    Change computer

But still the same problem ...

Would you happen to know what might be going on ?

[EDIT] : SMB Traces :

[1970/01/01 01:09:07.449826,  0] lib/fault.c:372(dump_core)
  dumping core in /usr/local/samba/var/cores/smbd
[1970/01/01 01:09:07.489470,  0] ../lib/util/tdb_wrap.c:65(tdb_wrap_log)
  tdb(/usr/local/samba/var/locks/locking.tdb): expand_file write of 8192 bytes failed (No space left on device)
[1970/01/01 01:09:08.051746,  0] locking/locking.c:905(share_mode_lock_destructor)
  store returned NT_STATUS_UNSUCCESSFUL
[1970/01/01 01:09:08.052047,  0] lib/util.c:1117(smb_panic)
  PANIC (pid 4088): could not store share mode entry: NT_STATUS_UNSUCCESSFUL
[1970/01/01 01:09:08.053048,  0] lib/util.c:1221(log_stack_trace)
  BACKTRACE: 0 stack frames:

[EDIT] : ADD :

It works on a Linux Virtual Machine, but not on the Windows Host
Have you setup the samba username and password

sudo smbpasswd -a sambauser

here username might be your system(Linux) username, ie. sambauser is my linux user,

set the permission of shared folder to sambauser

$ chown -R sambauser:root /media/ssd

and restart your SMB server

$ sudo service smbd restart

and then from window machine access your shared folder

go to run by hitting the keys window key + R and access your shared folder

\\[IP]\ssd


 
Hi, thanks. I've forgot to add that i'm ROOT on my Linux, plus my SAMBA security is "SHARE", are you sure I need to set a password, or add a user to the group (since I'm root) ? – xhaltar Jul 6 '15 at 10:23
    
for authentication you always need to have username and password, if you are accessing your data from any remote system – user4820 Jul 6 '15 at 10:24
    
Ok, so I've done like you did (remplacing "sambauser" by "root"), but it doesn't solve this :( – xhaltar Jul 6 '15 at 10:27
    
Check your samba access log file, it will tell you some information regarding ,access to file /var/log/samba/ here it exist – user4820 Jul 6 '15 at 10:31
 
Alright, I've updated my question with the traces. I'm trying to empty some space since there is a message about it ... but I does not work either ... – xhaltar Jul 6 '15 at 10:52
show 2 more comments

 

Sometimes Samba fails to install or update it's dependencies correctly. Try running the following command to ensure all the dependencies are available, this is on Ubuntu, modify for your Linux flavour:

$ sudo apt-get install --reinstall libsmbclient libsmbclient-dev libtevent0 libtalloc2

CentOS, RHEL:

$ sudo yum reinstall libsmbclient libsmbclient-dev libtevent0 libtalloc2

你可能感兴趣的:(windows,网络,ubuntu,samba,NetWork)