Page 1 of 2

Network Shares do not stay on reboot [SOLVED]

Posted: Thu Dec 27, 2012 7:40 am
by Reljoy
I make network shares by right clicking in Caja (1.4.0) and selecting Share Folder ... [Mint 14 Nadia 64 bit]

The shares work until I restart the computer and then they are gone.
I want them to stay. Can someone tell me what I can do to fix this?

Code: Select all

rperrett@Reljoy-Mint ~ $ smbtree
Enter rperrett's password: 
WORKGROUP
	\\RELJOY-MINT    		Reljoy-Mint server (Samba, LinuxMint)
		\\RELJOY-MINT\IPC$           	IPC Service (Reljoy-Mint server (Samba, LinuxMint))
		\\RELJOY-MINT\Lexmark-X342n  	Lexmark X342n
		\\RELJOY-MINT\print$         	Printer Drivers
		\\RELJOY-MINT\ReljoyMusic    	
		\\RELJOY-MINT\ReljoyVideos   	
		\\RELJOY-MINT\Pictures       	
		\\RELJOY-MINT\textaloudmp3   	
		\\RELJOY-MINT\2nd Chapter of Acts	
	\\RASPBMC        		Samba 3.6.6
	\\JENNY-EMACHINES		jenny-eMachines-E727 server (Samba, LinuxMint)
	\\DANI-OPTIPLEX-GX		Dani-OptiPlex-GX260 server (Samba, LinuxMint)
		\\DANI-OPTIPLEX-GX\Lexmark-X342n  	Lexmark X342n
		\\DANI-OPTIPLEX-GX\PDF            	PDF
		\\DANI-OPTIPLEX-GX\print$         	Printer Drivers
		\\DANI-OPTIPLEX-GX\IPC$           	IPC Service (Dani-OptiPlex-GX260 server (Samba, LinuxMint))

Code: Select all

rperrett@Reljoy-Mint ~ $ testparm -s
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 "[ReljoyMusic]"
Processing section "[ReljoyVideos]"
Processing section "[Pictures]"
Processing section "[textaloudmp3]"
Processing section "[2nd Chapter of Acts]"
Loaded services file OK.
WARNING: You have some share names that are longer than 12 characters.
These may not be accessible to some older clients.
(Eg. Windows9x, WindowsMe, and smbclient prior to Samba 3.0.)
Server role: ROLE_STANDALONE
[global]
	server string = %h server (Samba, LinuxMint)
	map to guest = Bad User
	obey pam restrictions = Yes
	pam password change = Yes
	passwd program = /usr/bin/passwd %u
	passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
	unix password sync = Yes
	syslog = 0
	log file = /var/log/samba/log.%m
	max log size = 1000
	name resolve order = bcast host lmhosts wins
	dns proxy = No
	usershare allow guests = Yes
	usershare owner only = No
	panic action = /usr/share/samba/panic-action %d
	idmap config * : backend = tdb
	force user = rperrett

[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

[ReljoyMusic]
	path = /home/rperrett/Music
	guest ok = Yes

[ReljoyVideos]
	path = /home/rperrett/Videos
	guest ok = Yes

[Pictures]
	path = /home/rperrett/Pictures
	guest ok = Yes

[textaloudmp3]
	path = /home/rperrett/Documents/textaloudmp3
	guest ok = Yes

[2nd Chapter of Acts]
	path = /home/rperrett/Music/2nd Chapter of Acts
	guest ok = Yes

Code: Select all

rperrett@Reljoy-Mint ~ $ net usershare info --long
rperrett@Reljoy-Mint ~ $ 
Edit:
I just discovered that the share 2nd Chapter of Acts which is inside the folder /home/rperrett/Music is still there on reboot.
The other shares are gone.
Is this because the other shares are in my Home folder /home/rperrett and not another level down?
If this is so, can it be fixed.

Re: Network Shares do not stay on reboot

Posted: Thu Dec 27, 2012 8:05 am
by cwsnyder
Sure, but you can only share folders in your /home/<owner>/ folder if you sign in with your credentials at the remote location.

Re: Network Shares do not stay on reboot

Posted: Thu Dec 27, 2012 8:32 am
by altair4
Edit:
I just discovered that the share 2nd Chapter of Acts which is inside the folder /home/rperrett/Music is still there on reboot.
The other shares are gone.
OK, that's just freaky. When you say the shares are gone do you mean they are not visible to the client machine or do you mean the remote guest can't access them?
Is this because the other shares are in my Home folder /home/rperrett and not another level down?
Don't think so. Your remote guests are being converted to "rperrett" because of the "force user" line in the global section of your smb.conf. So if you make a share of anything in your home folder everyone has access.

If you think about it the share at "/home/rperrett/Music/2nd Chapter of Acts" is unnecessary since you already shared "/home/rperrett/Music". It's the can see the subshare but not the parent share that's the freaky part.

Are you doing anything exotic like binding other partitions to your home sub-folders? You might want to post the output of the following commands:

Code: Select all

ls -dl /home/rperrett/Music

Code: Select all

ls -dl "/home/rperrett/Music/2nd Chapter of Acts"

Re: Network Shares do not stay on reboot

Posted: Thu Dec 27, 2012 8:48 am
by cwsnyder
I probably was too flip on my first answer, but I really do seem to remember that sharing directly off the /home/<user>/ folder was a 'bad idea' from earlier network administration work. Also, you do not mention if the
/home/rperrett/Documents/textaloudmp3
folder or file was also accessible.

As a workaround, have you considered putting all of the shared folders in a new folder called /home/rperrett/Shared/ and sharing from there?

Re: Network Shares do not stay on reboot

Posted: Thu Dec 27, 2012 9:07 am
by altair4
The shares work until I restart the computer and then they are gone.
You know, there could be a simpler explanation for all this. Every time you reboot or restart the samba services the network has a bit of a fit as a pecking order has to be established before browsing by host name works. If you try to browse immediately after login there's a good chance it won't work. But if you wait about 5 minutes it will work. This actually gets worse if you introduce a Windows machine in the mix.

Since all of your machines appear to be Linux there's a way to bypass Samba's master browser process by using something different. When you next reboot have the client access the missing share this way:

Code: Select all

caja smb://reljoy-mint.local/reljoymusic
In order for this to work the following service needs to be running on both the client and the server:

Code: Select all

sudo service avahi-daemon status

Re: Network Shares do not stay on reboot

Posted: Thu Dec 27, 2012 7:31 pm
by Reljoy
Thanks for the replies altair4 and cwsnyder,
  • rperrett@Reljoy-Mint ~ $ ls -dl /home/rperrett/Music
    drwxr-xr-x 71 rperrett rperrett 4096 Dec 27 14:11 /home/rperrett/Music
  • rperrett@Reljoy-Mint ~ $ ls -dl "/home/rperrett/Music/2nd Chapter of Acts"
    drwx------ 3 rperrett rperrett 4096 Feb 11 2009 /home/rperrett/Music/2nd Chapter of Acts
I hadn't noticed the Text Aloud share before. I'm wondering if it was somehow left over from Mint 10 (which I upgraded from recently)
  • rperrett@Reljoy-Mint ~ $ ls -dl "/home/rperrett/Documents/textaloudmp3"
    drwxr-xr-x 16 rperrett rperrett 12288 Dec 22 2011 /home/rperrett/Documents/textaloudmp3
Sure, but you can only share folders in your /home/<owner>/ folder if you sign in with your credentials at the remote location.
I had been trying to connect from my Raspberry Pi (B) and it was asking for a username and password, but entering my username and password for my desktop (Reljoy-Mint) just didn't work. I put pi as a username on my desktop and put it in samba and that allowed me to connect from the Raspberry Pi.
When you say the shares are gone do you mean they are not visible to the client machine or do you mean the remote guest can't access them?
You know, there could be a simpler explanation for all this. Every time you reboot or restart the samba services the network has a bit of a fit as a pecking order has to be established before browsing by host name works. If you try to browse immediately after login there's a good chance it won't work. But if you wait about 5 minutes it will work.
This morning when I turned on my desktop (Reljoy-Mint), I can't see any shares on my desktop except for
textaloudmp3 and 2nd Chapter of Acts.
My Raspberry Pi can access my desktop shares to play music from /home/rperrett/Music
My laptop running Mint 9 can see all my shares. It can play music, videos and view pictures.
So my laptop can see my shares but my desktop cannot see shares in /home/rperrett. Yesterday, when I tried to access the shares from my laptop, it didn't work. That may have been because I didn't wait long enough for the sharing to start working???

I have read in forums that other people have had trouble with shares in Caja not being visible.
Now I need to try to find out if it is possible to make them visible in Caja.


I didn't do this yet:
caja smb://reljoy-mint.local/reljoymusic
Is this likely to help in the light of what I have found out?
In order for this to work the following service needs to be running on both the client and the server:
  • rperrett@Reljoy-Mint ~ $ sudo service avahi-daemon status
    [sudo] password for rperrett:
    avahi-daemon start/running, process 1022

Re: Network Shares do not stay on reboot

Posted: Thu Dec 27, 2012 11:07 pm
by kwisher
altair4 wrote:
In order for this to work the following service needs to be running on both the client and the server:

Code: Select all

sudo service avahi-daemon status
The avahi service is not necessary for Samba to work. In fact I remove it from all my machines, especially my Samba/NFS file server.

Re: Network Shares do not stay on reboot

Posted: Fri Dec 28, 2012 8:13 am
by altair4
kwisher wrote:
altair4 wrote:
In order for this to work the following service needs to be running on both the client and the server:

Code: Select all

sudo service avahi-daemon status
The avahi service is not necessary for Samba to work. In fact I remove it from all my machines, especially my Samba/NFS file server.
NOTE: To any out there that read this I would like to apologize for the following response. It's purely emotional and does not serve the original poster in the least.

@kwisher, If you are going to quote me, reach the wrong conclusion, and offer bad advice the least you could do is quote me in context:
altair4 wrote:Since all of your machines appear to be Linux there's a way to bypass Samba's master browser process by using something different. When you next reboot have the client access the missing share this way:

Code: Select all

caja smb://reljoy-mint.local/reljoymusic
In order for this to work the following service needs to be running on both the client and the server:

Code: Select all

sudo service avahi-daemon status
Folks, don't remove avahi from your system you will find all sorts of uses for it: Avahi Networking: http://forums.linuxmint.com/viewtopic.php?f=42&t=112833

Re: Network Shares do not stay on reboot

Posted: Fri Dec 28, 2012 8:47 am
by altair4
I had been trying to connect from my Raspberry Pi (B) and it was asking for a username and password, but entering my username and password for my desktop (Reljoy-Mint) just didn't work. I put pi as a username on my desktop and put it in samba and that allowed me to connect from the Raspberry Pi.
What's confusing about this is that all your shares allow guest access so no one should be prompted for username and password.

I'm getting confused by your reference to the "desktop":
This morning when I turned on my desktop (Reljoy-Mint), I can't see any shares on my desktop except for
textaloudmp3 and 2nd Chapter of Acts.
What desktop are you referring to: Reljoy-Mint or Dani-OptiPlex-GX260 ?
BTW, you will eventually have to change the netbios name of Dani-OptiPlex-GX260 since it's 4 characters too long. It's easy to do in smb.conf.

If it's the OpriPlex what is the output of smbtree from Dani-OptiPlex-GX260.

Re: Network Shares do not stay on reboot

Posted: Fri Dec 28, 2012 1:07 pm
by kwisher
altair4 wrote:@kwisher, If you are going to quote me, reach the wrong conclusion, and offer bad advice the least you could do is quote me in context:
altair4 wrote:Since all of your machines appear to be Linux there's a way to bypass Samba's master browser process by using something different. When you next reboot have the client access the missing share this way:

Code: Select all

caja smb://reljoy-mint.local/reljoymusic
In order for this to work the following service needs to be running on both the client and the server:

Code: Select all

sudo service avahi-daemon status
Folks, don't remove avahi from your system you will find all sorts of uses for it: Avahi Networking: http://forums.linuxmint.com/viewtopic.php?f=42&t=112833
I will stand by my post, Avahi is not necessary for Samba or NFS to function on a network. That is a fact as I don't use it on my network.

Re: Network Shares do not stay on reboot

Posted: Fri Dec 28, 2012 1:26 pm
by altair4
kwisher wrote:I will stand by my post, Avahi is not necessary for Samba or NFS to function on a network. That is a fact as I don't use it on my network.
** Unless you quote me out of context I never said it was required for Samba to function. Read the entire context of my post. Do I need to quote it again? Or are you just going to refuse to read it.

** I'm using it to bypass the netbios discovery mechanism of samba.

** Please read the following HowTo: Avahi Networking: http://forums.linuxmint.com/viewtopic.php?f=42&t=112833

If you have any questions about what it is or how to use it post them in that topic.

This topic has to have the most unusual symptoms I've seen in a long time. The OP only posts once a day however which is making this particularly frustrating to work with so telling him he doesn't need avahi is a non-sequitur.

I wanted him to access the server with the following command from the client using an mDNS qualified host name:

Code: Select all

caja smb://reljoy-mint.local
The only way that will work is if the server and client have avahi ( or zeroconf or Bonjour ) running.

Re: Network Shares do not stay on reboot

Posted: Fri Dec 28, 2012 7:18 pm
by kwisher
Instead of tying to do some hokey name resolution with Avahi, you should get back to basics and use IP addresses to make sure everything is working. If network communications do not work at the IP level then there is no sense giving instructions that involve anything else. If the user wants name resolution and he does not have an internal DHCP/DNS server to assign host names, the maual addition of his network machine names in the hosts file is another option.

If this is a all Linux network, NFS is a much better solution than Samba, in my opinion. Although both can be used at the same time.

Re: Network Shares do not stay on reboot

Posted: Fri Dec 28, 2012 7:22 pm
by altair4
@Reljoy,
Reljoy wrote:I hadn't noticed the Text Aloud share before. I'm wondering if it was somehow left over from Mint 10 (which I upgraded from recently)
I just noticed this in a previous post of yours. Did you upgrade this machine to 14 from 10?

I'll admit this is a longshot but does the output of the following command list any files:

Code: Select all

ls -al /var/lib/samba/usershares

Re: Network Shares do not stay on reboot

Posted: Fri Dec 28, 2012 7:58 pm
by Reljoy
Sorry that I'm not getting back as often as is hoped.
When I say desktop, I am meaning my desktop computer, which is called Reljoy-Mint. The one that comes up as Dani-OptiPlex-GX260 is my daughter's computer. I am not trying to network with it.

Yes I did upgrade Reljoy-Mint from Mint 10 (64 bit) to Mint 14 Mate (64 bit). I kept my /home partition and formatted / and /boot.

Code: Select all

rperrett@Reljoy-Mint ~ $ ls -al /var/lib/samba/usershares
total 8
drwxrwx--T 2 root sambashare 4096 Oct 18 22:24 .
drwxr-xr-x 4 root root       4096 Oct 18 22:24 ..
rperrett@Reljoy-Mint ~ $ 
I'm guessing that this was supposed to show more that it did. When I did this command on my laptop (Mint-Laptop), I got 9 more lines after
... root sambashare ...
... root root ...


In case it helps, I have also made a new share since I started posting. It also shows the shares on my laptop (Mint-Laptop) - that's interesting.

Code: Select all

rperrett@Reljoy-Mint ~ $ smbtree
Enter rperrett's password: 
WORKGROUP
	\\RELJOY-MINT    		Reljoy-Mint server (Samba, LinuxMint)
		\\RELJOY-MINT\Lexmark-X342n  	Lexmark X342n
		\\RELJOY-MINT\print$         	Printer Drivers
		\\RELJOY-MINT\ReljoyMusic    	
		\\RELJOY-MINT\ReljoyVideos   	
		\\RELJOY-MINT\Pictures       	
		\\RELJOY-MINT\textaloudmp3   	
		\\RELJOY-MINT\2nd Chapter of Acts	
		\\RELJOY-MINT\Public         	
		\\RELJOY-MINT\IPC$           	IPC Service (Reljoy-Mint server (Samba, LinuxMint))
	\\MINT-LAPTOP    		Mint-Laptop server (Samba, LinuxMint)
		\\MINT-LAPTOP\laptopdownloads	
		\\MINT-LAPTOP\public         	
		\\MINT-LAPTOP\downloads      	
		\\MINT-LAPTOP\annie's formal 	
		\\MINT-LAPTOP\musiclaptop    	
		\\MINT-LAPTOP\2012tasmania   	
		\\MINT-LAPTOP\IPC$           	IPC Service (Mint-Laptop server (Samba, LinuxMint))
		\\MINT-LAPTOP\print$         	Printer Drivers
rperrett@Reljoy-Mint ~ $ 
I wanted him to access the server with the following command from the client using an mDNS qualified host name:
caja smb://reljoy-mint.local
I'm not quite sure what 'from the client' means. If it means from Reljoy-Mint, then what it did was to open a window in Caja and display all my shares. The icons of the shares look like green folders with little RJ45 sockets and a cable with a plug just near the socket. The Location is
smb://reljoy-mint.local/

When I try this same command 'caja smb://reljoy-mint.local' from Mint-Laptop, I get an error message telling me

Code: Select all

caja: command not found
I have no idea what 'using an mDNS qualified host name' means - sorry.

And just in case it has been forgotten in the posts, I am hoping that I can get all my shared folders to show up in Reljoy-Mint in caja.

Re: Network Shares do not stay on reboot

Posted: Fri Dec 28, 2012 8:16 pm
by altair4
When I say desktop, I am meaning my desktop computer, which is called Reljoy-Mint.
Then what does this mean:
This morning when I turned on my desktop (Reljoy-Mint), I can't see any shares on my desktop except for
textaloudmp3 and 2nd Chapter of Acts.
Reljoy-Mint can't see any of it's own shares?

And yet when you run smbtree it shows them all:
\\RELJOY-MINT Reljoy-Mint server (Samba, LinuxMint)
\\RELJOY-MINT\Lexmark-X342n Lexmark X342n
\\RELJOY-MINT\print$ Printer Drivers
\\RELJOY-MINT\ReljoyMusic
\\RELJOY-MINT\ReljoyVideos
\\RELJOY-MINT\Pictures
\\RELJOY-MINT\textaloudmp3
\\RELJOY-MINT\2nd Chapter of Acts
\\RELJOY-MINT\Public
\\RELJOY-MINT\IPC$ IPC Service (Reljoy-Mint server (Samba, LinuxMint))
And just in case it has been forgotten in the posts, I am hoping that I can get all my shared folders to show up in Reljoy-Mint in caja.
You just wrote they did:
then what it did was to open a window in Caja and display all my shares. The icons of the shares look like green folders with little RJ45 sockets and a cable with a plug just near the socket. The Location is
smb://reljoy-mint.local/
Although I have no idea what this means:
When I try this same command 'caja smb://reljoy-mint.local' from Mint-Laptop, I get an error message telling me

Code: Select all

caja: command not found
caja is your file manager in mate. I t doesn't know what the file manager name is?

EDIT: I am now totally lost as to who is trying to access these shares. It doesn't make any sense for reljoy-mint to access its own shares, You don't want the Optiplex to access these shares, so who is it that's having problems access these shares?

Re: Network Shares do not stay on reboot

Posted: Fri Dec 28, 2012 8:55 pm
by altair4
When I try this same command 'caja smb://reljoy-mint.local' from Mint-Laptop, I get an error message telling me

Code: Select all

caja: command not found
Ah, little too hasty on this one. See, I have no idea what operating system you are using on this Mint-Laptop so:

If it's Mint14:

Code: Select all

nemo smb://reljoy-mint.local
If it's some earlier Mint version using Gnome:

Code: Select all

nautilus smb://reljoy-mint.local
If it's some XFCE based system then it's:

Code: Select all

thunar smb://reljoy-mint.local
I'm packing it in for the day since it's way past my bedtime.

When or if it connects bookmark the location.

Re: Network Shares do not stay on reboot

Posted: Fri Dec 28, 2012 9:21 pm
by Reljoy
I can tell that I keep confusing you. I have search for a way to show screen dumps on this forum. Hopefully this will work and make things much clearer.

If this link works, it will show a screen dump of caja on Reljoy-Mint NOT showing any shares. This is where I am used to seeing shares appear in the past in Mint 10. I would very much like to see the shares appear here.
Image

This link should show the Reljoy-Mint shares AFTER running the command caja smb://reljoy-mint.local
Image

This link shows the share 2nd Chapter of Acts in caja
Image

This links shows the textaloudmp3 share in caja
Image

I access the Reljoy-Mint shared folders using my laptop (called Mint-Laptop). Mint-Laptop can see the Reljoy-Mint shares and access them.

I want to be able to see the Reljoy-Mint shared folders when I am sitting at the Reljoy-Mint computer using the default file manager, called caja.

Ah, little too hasty on this one. See, I have no idea what operating system you are using on this Mint-Laptop so:
It's Mint 10 on Mint-Laptop.
nautilus smb://reljoy-mint.local
When I enter this on Mint-Laptop I get an error message - see the image link
Image
I'm packing it in for the day since it's way past my bedtime.
I really appreciate your help. You must be about 12 hours behind my local time. It's 12:22 in the afternoon here in Sydney Australia.

Re: Network Shares do not stay on reboot

Posted: Sat Dec 29, 2012 9:05 am
by altair4
Sadly those images did not work.
I access the Rel joy-Mint shared folders using my laptop (called Mint-Laptop). Mint-Laptop can see the Reljoy-Mint shares and access them.
Let's pause for a moment. The function of Samba is for a client ( Mint-Laptop in this case ) to access the shared resources of a server ( Reljoy-Mint in this case ). It would appear that that mission has been accomplished.

You do have a peculiar problem on the server that does not impact this Samba file sharing function:
If this link works, it will show a screen dump of caja on Reljoy-Mint NOT showing any shares. This is where I am used to seeing shares appear in the past in Mint 10. I would very much like to see the shares appear here.
...
I want to be able to see the Reljoy-Mint shared folders when I am sitting at the Reljoy-Mint computer using the default file manager, called caja.
This is going to be a hard one to debug ( at least for me personally ) because:

[1] You upgraded a Mint 10 Gnome2 based machine to a Mint14 Mate ( Gnome2 fork ) based machine. I didn't even think that was possible so you can see you're not going to get very far with me.

[2] I have used Mate14 a total of about 6 hours. In fact I only installed it to answer this post so I'm probably not the best person to offer insights in the inner workings of Mate.

This sounds promising though:
I wanted him to access the server with the following command from the client using an mDNS qualified host name:

Code: Select all

caja smb://reljoy-mint.local
I'm not quite sure what 'from the client' means. If it means from Reljoy-Mint, then what it did was to open a window in Caja and display all my shares. The icons of the shares look like green folders with little RJ45 sockets and a cable with a plug just near the socket. The Location is
smb://reljoy-mint.local/
That sounds to me exactly what you want. You are doing that through avahi so what you can do to make this more seamless is this:
Run the following command on Reljoy-Mint:

Code: Select all

caja smb://reljoy-mint.local
When caja opens up to that location immediately bookmark it: Bookmarks > Add Bookmark

You will get a shortcut on the left side panel of caja labeled "Windows Shares on reljoy-mint". The next time you login you can use that bookmark to see all your own shares. I don't know why you want to see your own shares but they should show up in caja. You can even rename the bookmark if you like by right clicking it and selecting: Rename

Re: Network Shares do not stay on reboot

Posted: Sun Dec 30, 2012 5:56 pm
by Reljoy
Thank you for your efforts altair4.
I did as you suggested
caja smb://reljoy-mint.local
and bookmarked the resulting location.

For the sake of trying to get them to work (& perhaps for me when I reread my post in the future), I will again try to put links to the images using 'hotlink for forums'.

Image

Image
free photo hosting

Image
picture hosting

Image
photo sharing sites

Image
image upload

Re: Network Shares do not stay on reboot

Posted: Sun Dec 30, 2012 6:33 pm
by altair4
EDIT:

The last error message doesn't matter. You don't need to access the reljoy server using that command. My guess is you don't have avahi-daemon running on Mint-Laptop but it doesn't matter. You stated the following before:
I access the Rel joy-Mint shared folders using my laptop (called Mint-Laptop). Mint-Laptop can see the Reljoy-Mint shares and access them.
So is there a remaining problem?