Samba Share Not Visible: LM13/Asus 1225C

Questions about Wi-Fi and other network devices, file sharing, firewalls, connection sharing etc
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
damianoloan

Samba Share Not Visible: LM13/Asus 1225C

Post by damianoloan »

I've been having problems with a Samba share from my Asus 1225C (with LM13 32-bit) to my Raspberry Pi for some weeks. The Pi can't access the share, nor can my phone, using AndSMB on an Android fork.

The contents of my smb.conf file are here: http://pastebin.com/1xJijthd

ifconfig output:

Code: Select all

Link encap:Ethernet  HWaddr 10:bf:48:1d:6d:93  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:50 Base address:0x6000 

eth1      Link encap:Ethernet  HWaddr e0:b9:a5:f7:9b:b2  
          inet addr:192.168.1.43  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::e2b9:a5ff:fef7:9bb2/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:9011 errors:3 dropped:0 overruns:0 frame:10717
          TX packets:8906 errors:27 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:6824232 (6.8 MB)  TX bytes:1389243 (1.3 MB)
          Interrupt:17 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:476 errors:0 dropped:0 overruns:0 frame:0
          TX packets:476 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:100832 (100.8 KB)  TX bytes:100832 (100.8 KB)
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
altair4
Level 20
Level 20
Posts: 11419
Joined: Tue Feb 03, 2009 10:27 am

Re: Samba Share Not Visible: LM13/Asus 1225C

Post by altair4 »

Not sure what you mean by "can't access the share".

The client can't see the share or the client can see the share but is denied access?

You are also using a non standard smb.conf and no one still living remembers how "security = SHARE" works but the first thing I would check is the following:

You have this line in the [global] section of smb.conf:
force user = XBian
Run the following command:

Code: Select all

ls -al /home/damian
Does the user XBian have access to Videos, TV, and Add-Ons.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
damianoloan

Re: Samba Share Not Visible: LM13/Asus 1225C

Post by damianoloan »

Here is a log file from the Pi, it seems to be a permissions problem: http://pastebin.com/rk3njpvx

Very occasionally the 1225C server appears in Workgroup, but normally browsing through XBMC's SMB option gives the message Error 2: Share Not Available and using Add Network Location with the IP + file address gives the message Connection timed out.

I added the force user = following advice on the XBMC forum, you can see the thread here if it's useful: http://forum.xbmc.org/showthread.php?tid=157621

XBian doesn't appear in the output of ls -al /home/damian - it should have access only to home/damian/Videos, home/damian/TV and home/damian/Add-Ons, I understand.
altair4
Level 20
Level 20
Posts: 11419
Joined: Tue Feb 03, 2009 10:27 am

Re: Samba Share Not Visible: LM13/Asus 1225C

Post by altair4 »

Still don't know if this is a "can't see the host" problem or a permissions issue so I would suggest the following:

** If it's a "can't see the share" problem go through the checklist: http://forums.linuxmint.com/viewtopic.p ... 46&start=0

** Then run the following command to see if it at least lists your Mint machine:

Code: Select all

smbtree
** As far as this "force user = XBian" thing I don't know what to tell you since I don't even know if there is an XBian user on your Mint system. All of your shares allow guest access and all of them are in what appears to be your home directory:
[Videos]
path = /home/damian/Videos
; writeable = no
create mask = 777
directory mask = 777
browseable = yes
guest ok = yes
Since no can write to the share you can get buy with permissions of 755 or 775. What is the output of this command:

Code: Select all

ls -dl /home/damian/Videos
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
damianoloan

Re: Samba Share Not Visible: LM13/Asus 1225C

Post by damianoloan »

Thanks, I'll try to be clear but as you can see I'm not an expert...

"Still don't know if this is a "can't see the host" problem or a permissions issue" - I never have permission to access the server. On a few occasions, I have seen the hostname 'damian-1225C' via XBMC's SMB browser - but never the shared folders and I always meet a permissions problem.

I've been through the checklist. The only sticking point was running 5b on the Pi, but I have no firewall just now in this network.

I have no output for smbtree.

"As far as this "force user = XBian" thing I don't know what to tell you since I don't even know if there is an XBian user on your Mint system." - Xbian is the hostname of the Raspberry Pi. It doesn't appear in my Windows Network folder. Since I set an SMB password following advice in the XBMC forum, neither does the 1225C itself
Output of ls -dl /home/damian/Videos:

Code: Select all

drwxr-xr-x 139 damian damian 12288 Mar  2 23:27 /home/damian/Videos:
altair4
Level 20
Level 20
Posts: 11419
Joined: Tue Feb 03, 2009 10:27 am

Re: Samba Share Not Visible: LM13/Asus 1225C

Post by altair4 »

If you followed the cheklist then running the following command:

Code: Select all

testparm -s
Should list the following line:
name resolve order = bcast host lmhosts wins
No output from smbtree is usually because smbd or nmbd isn't running or a firewall is in the way all of which is covered in the HowTo.

XBian does not have write access to the share. It's not clear if you want it to but if you do your share is not configured to allow it. And if it were the Linux permissions on the target folder won't allow it either. To fix that:
[Videos]
path = /home/damian/Videos
writeable = yes
create mask = 777
directory mask = 777
browseable = yes
guest ok = yes
And then change permissions on the target:

Code: Select all

chmod 777 /home/damian/Videos
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
damianoloan

Re: Samba Share Not Visible: LM13/Asus 1225C

Post by damianoloan »

Sorry about the slow responses. I've corrected the name resolve order and removed the force user = XBian.

With no firewall, still no output to smbtree. I entered sudo service smbd restart and retried, still no output.

I created a password following advice on the XBMC forum, perhaps this is related.

I've made the other changes you mentioned. I also changed the line security = share to security = user.

This is the output of testparm -s at the moment:

Code: Select all

Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[printers]"
Processing section "[print$]"
Processing section "[Videos]"
Processing section "[TV]"
Processing section "[Add-Ons]"
Loaded services file OK.
Server role: ROLE_STANDALONE
[global]
	server string = %h server (Samba, Ubuntu)
	obey pam restrictions = Yes
	passwd program = /usr/bin/passwd %u
	passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n *password\supdated\ssuccessfully* .
	syslog = 0
	log file = /var/log/samba/log.%m
	max log size = 1000
	name resolve order = bcast host lmhosts wins
	dns proxy = No
	panic action = /usr/share/samba/panic-action %d
	idmap config * : backend = tdb
	invalid users = root

[printers]
	comment = All Printers
	path = /var/spool/samba
	create mask = 0700
	printable = Yes
	print ok = Yes
	browseable = No

[print$]
	comment = Printer Drivers
	path = /var/lib/samba/printers

[Videos]
	path = /home/damian/Videos
	create mask = 0777
	directory mask = 0777
	guest ok = Yes

[TV]
	path = /home/damian/TV
	create mask = 0777
	directory mask = 0777
	guest ok = Yes

[Add-Ons]
	path = /home/damian/Add-Ons
	create mask = 0777
	directory mask = 0777
	guest ok = Yes
altair4
Level 20
Level 20
Posts: 11419
Joined: Tue Feb 03, 2009 10:27 am

Re: Samba Share Not Visible: LM13/Asus 1225C

Post by altair4 »

EDIT: You need to make an adjustment to your smb.conf:
Add the following line - right under the workgroup line:

Code: Select all

map to guest = Bad User
Then save smb.conf and restart samba:

Code: Select all

sudo service smbd restart
******************************************

Let's try an experiment and remove as much non-Samba stuff as possible:

From your Mint machine run the following command from the terminal - I don't know which desktop you are using so I'm assuming it's Cinnamon:

Code: Select all

nautilus smb://192.168.0.100
** If you are using something other than Cinnamon substitute the name of your file manager for nautilus.
** Replace 192.168.0.100 with the ip address of your Mint machine.

Do you have access to your shares?
I created a password following advice on the XBMC forum, perhaps this is related.
All of your shares allow guest access so there is no need for anyone to have a samba password. If you believe this is an issue remove it. For example:

Code: Select all

sudo smbpasswd -x XBian
You can always reinstate it if you need it:

Code: Select all

sudo smbpasswd -a XBian
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
damianoloan

Re: Samba Share Not Visible: LM13/Asus 1225C

Post by damianoloan »

I've added the line under workgroup and restarted Samba, it now reads:

Code: Select all

# Change this to the workgroup/NT-domain name your Samba server will part of
	workgroup = WORKGROUP
	map to guest = Bad User

# server string is the equivalent of the NT Description field
I entered the nautilus smb:// command, but I couldn't access the share afterwards from the Pi or my phone using AndSMB. My shares are now visible on the 1225C though, which is indeed using Cinnamon.

The output of smbtree (progress!) is now:

Code: Select all

WORKGROUP
	\\DAMIAN-1225C   		damian-1225C server (Samba, Ubuntu)
		\\DAMIAN-1225C\IPC$           	IPC Service (damian-1225C server (Samba, Ubuntu))
		\\DAMIAN-1225C\Add-Ons        	
		\\DAMIAN-1225C\TV             	
		\\DAMIAN-1225C\Videos         	
		\\DAMIAN-1225C\print$         	Printer Drivers
And here is the log file of the Pi trying to access the share, if it's of any use:

Code: Select all

20:07:13 T:3042836480   DEBUG: OnKey: return (f00d) pressed, action is Select
20:07:13 T:3042836480   DEBUG: ------ Window Deinit (DialogOK.xml) ------
20:07:13 T:3042836480   ERROR: GetDirectory - Error getting smb://
20:07:13 T:3042836480   ERROR: CGUIDialogFileBrowser::GetDirectory(smb://) failed
20:07:14 T:3042836480   DEBUG: Keyboard: scancode: 67, sym: 0111, unicode: 0000, modifier: 0
20:07:14 T:3042836480   DEBUG: OnKey: up (f080) pressed, action is Up
20:07:14 T:3042836480   DEBUG: Keyboard: scancode: 67, sym: 0111, unicode: 0000, modifier: 0
20:07:14 T:3042836480   DEBUG: OnKey: up (f080) pressed, action is Up
20:07:14 T:3042836480   DEBUG: Keyboard: scancode: 67, sym: 0111, unicode: 0000, modifier: 0
20:07:14 T:3042836480   DEBUG: OnKey: up (f080) pressed, action is Up
20:07:15 T:3042836480   DEBUG: Keyboard: scancode: 1c, sym: 000d, unicode: 0000, modifier: 0
20:07:15 T:3042836480   DEBUG: OnKey: return (f00d) pressed, action is Select
20:07:15 T:2954884160   DEBUG: OpenDir - Using authentication url smb://192.168.1.43/home/damian/Videos
20:07:16 T:3042836480   DEBUG: ------ Window Init (DialogBusy.xml) ------
20:07:21 T:2954884160   ERROR: SMBDirectory->GetDirectory: Unable to open directory : 'smb://192.168.1.43/home/damian/Videos'
                                            unix_err:'6e' error : 'Connection timed out'
20:07:21 T:3042836480   DEBUG: ------ Window Init (DialogOK.xml) ------
20:07:22 T:3042836480   DEBUG: ------ Window Deinit (DialogBusy.xml) ------
altair4
Level 20
Level 20
Posts: 11419
Joined: Tue Feb 03, 2009 10:27 am

Re: Samba Share Not Visible: LM13/Asus 1225C

Post by altair4 »

20:07:21 T:2954884160 ERROR: SMBDirectory->GetDirectory: Unable to open directory : 'smb://192.168.1.43/home/damian/Videos'
There is no such thing as smb://192.168.1.43/home/damian/Videos. The "smb://" protocol know nothing of the internal path to the share. The Samba server takes care of that. You should be access the share with a:

Code: Select all

smb://192.168.1.43/videos
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
damianoloan

Re: Samba Share Not Visible: LM13/Asus 1225C

Post by damianoloan »

Same result though, I tried this for all three, and used both lower case as you mentioned and the end folder name as per the LM server for v/Videos.

And same result from my phone.

I'm using a static IP but I checked it again and the 1.43 is correct.
altair4
Level 20
Level 20
Posts: 11419
Joined: Tue Feb 03, 2009 10:27 am

Re: Samba Share Not Visible: LM13/Asus 1225C

Post by altair4 »

Well, there is nothing more you can do on the Samba part of Mint since everything seems to be working. You can access the Samba share from Mint and smbtree does not display errors.

There's an outside chance that this is all a Linux permissions problem in that the entire path does not allow guest access to traverse all folders but I doubt it. If that is an issue instead of changing permissions you could modify one of your shares :
[Videos]
path = /home/damian/Videos
writeable = yes
force user = damian
create mask = 777
directory mask = 777
browseable = yes
guest ok = yes
Then restart smbd again.

It's also possible that you encrypted your home directory and I'm not sure how you get out of that one. Perhaps the "force user = damian" would fix that as well. Or change the folder you share to something outside of your home directory.

It is also possible that this is not a Samba or a Linux problem but a networking problem - all of the machines are not in the same subnet kind of thing. That I don't have much experience in.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
damianoloan

Re: Samba Share Not Visible: LM13/Asus 1225C

Post by damianoloan »

No luck with force user = damian, I'm afraid.

I haven't encrypted my home folder. I don't think it's a network problem, I can ping devices, use my phone as an XBMC remote with Yatse ans ssh from Mint to the Pi is fine.

I think it's a big mystery. Thanks very much for your patience and help, I'm sure your suggestions will solve a lot of other people's issues.
Locked

Return to “Networking”