Author Topic: sharing windows network shares permanently [solved]  (Read 3459 times)

Offline longtom

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3339
  • Satellite Station Africa
sharing windows network shares permanently [solved]
« on: April 18, 2010, 08:14:25 AM »
Hi,

I used to share my windows network shares like this in fstab:

Code: [Select]
//cheetah/Cheetah /media/cheetah cifs guest,uid=1000,iocharset=utf8,codepage=unicode,unicode,umask=000 0 0
//192.168.1.123/Tiger /media/tiger cifs guest,uid=1000,iocharset=utf8,codepage=unicode,unicode,umask=777 0 0
//Crocodile/crocs /media/crocs cifs guest,uid=1000,iocharset=utf8,codepage=unicode,unicode,umask=000 0 0
//Crocodile/Birdies /media/birds cifs guest,uid=1000,iocharset=utf8,codepage=unicode,unicode,umask=000 0 0
//sublimation/Archive /media/archive cifs guest,uid=1000,iocharset=utf8,codepage=unicode,unicode,umask=000 0 0
//Crocodile/snakes /media/snakes cifs guest,uid=1000,iocharset=utf8,codepage=unicode,unicode,umask=000 0 0
//annelize/order\040book /media/Orderbook cifs guest,rw,iocharset=utf8,nobrl,file_mode=0777,dir_mode=0777 0 0
//cangopublic/Photos\040sort /media/Photosort cifs guest,uid=1000,iocharset=utf8,codepage=unicode,unicode 0 0
//curio/My\040Documents /media/Curio cifs guest,rw,iocharset=utf8,nobrl,file_mode=0777,dir_mode=0777 0 0

That worked quite sweet.  Since I switched to PCLinuxOS it doesn't anymore.

The error message at "mount -a" in a superuser terminal

is

Code: [Select]
mount error: could not resolve address for cheetah: Name or service not known
No ip address specified and hostname not found
mount error(113): No route to host
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
mount error: could not resolve address for Crocodile: Name or service not known
No ip address specified and hostname not found
mount error: could not resolve address for Crocodile: Name or service not known
No ip address specified and hostname not found
mount error: could not resolve address for sublimation: Name or service not known
No ip address specified and hostname not found
mount error: could not resolve address for Crocodile: Name or service not known
No ip address specified and hostname not found
mount error: could not resolve address for annelize: Name or service not known
No ip address specified and hostname not found
mount error: could not resolve address for cangopublic: Name or service not known
No ip address specified and hostname not found
mount error: could not resolve address for curio: Name or service not known
No ip address specified and hostname not found

Any ideas I can get this going?
« Last Edit: April 20, 2010, 05:16:34 AM by longtom »
Regards longtom

PCLinuxOS KDE 32bit
Intel Core 2 Duo E2200 / 2.2 GHz
2GB Ram
Nvidia GT610

Offline longtom

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3339
  • Satellite Station Africa
Re: sharing windows network shares permanently
« Reply #1 on: April 18, 2010, 09:01:50 AM »
Update:

when I do a

Code: [Select]
mount.cifs //192.168.1.122/cheetah /media/cheetah

the share does mount.  How do I translate this into the fstab file in order to have that permanently on start up (read/write)?
Regards longtom

PCLinuxOS KDE 32bit
Intel Core 2 Duo E2200 / 2.2 GHz
2GB Ram
Nvidia GT610

Offline Xero

  • Sr. Member
  • ****
  • Posts: 469
Re: sharing windows network shares permanently
« Reply #2 on: April 18, 2010, 09:09:24 AM »
 Do your machines have static IP's? Have you setup samba shares in the Control Center?

Apols if these seem silly questions to you, but it's often the little things that let you down. :)
There is no shame in saying "I don't know".

Offline longtom

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3339
  • Satellite Station Africa
Re: sharing windows network shares permanently
« Reply #3 on: April 18, 2010, 09:22:59 AM »
Do your machines have static IP's? Have you setup samba shares in the Control Center?

Apols if these seem silly questions to you, but it's often the little things that let you down. :)

1. Yes - the machines have fixed ip addresses.

2. I am not sure about this one.  I can see the shares in Dolphin - if that says something about my samba state.
Regards longtom

PCLinuxOS KDE 32bit
Intel Core 2 Duo E2200 / 2.2 GHz
2GB Ram
Nvidia GT610

Offline menotu

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 15515
  • ┌∩┐(◕_◕)┌∩┐
Re: sharing windows network shares permanently
« Reply #4 on: April 18, 2010, 11:06:53 AM »
Firewall ?
PCLinuxOS 32bit KDE 4.10.4; kernel-3.4.11-pclos1.bfs & 64bit 3.4.38bfs; NVidia GeForce 8400GS 1GB 310.19 driver

Sony Vaio SVE1513A4ESI Laptop, Intel Core i5, 2.6GHz, 6GB RAM, 750GB, 15.6" Intel HD Graphics 4000

Offline longtom

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3339
  • Satellite Station Africa
Re: sharing windows network shares permanently
« Reply #5 on: April 18, 2010, 11:32:40 PM »
Firewall ?

None...  If this doesn't work I have a real problem.  Without this I can not use PCLinuxOS in earnest, which would be a real pitty.
Regards longtom

PCLinuxOS KDE 32bit
Intel Core 2 Duo E2200 / 2.2 GHz
2GB Ram
Nvidia GT610

Offline muungwana

  • Hero Member
  • *****
  • Posts: 6268
Re: sharing windows network shares permanently
« Reply #6 on: April 18, 2010, 11:41:43 PM »
If you look closely, you will notice you only have problems with shares that do not use ip addresses 

if all your computer on the network have static ip addresses, you can solve this problem by substituting those computer names with their ip addresses.
.. 3 things are certain in life : death, taxes and software bloat ..
.. tell me something i don't know, something i can use as i struggle to reason with the world around me ..

Offline longtom

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3339
  • Satellite Station Africa
Re: sharing windows network shares permanently
« Reply #7 on: April 19, 2010, 12:22:07 AM »
If you look closely, you will notice you only have problems with shares that do not use ip addresses  

if all your computer on the network have static ip addresses, you can solve this problem by substituting those computer names with their ip addresses.


I looked closely and I see that the second share doesn't work either.  The error message is:

Code: [Select]
...
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
...

I should mention that the very same fstab works fine in another, debian based, distribution.  This appears to be something more specific to the workings of PCLinuxOS.
I also need to mention that I had similar problems with Mandriva once but managed to solve it by using ip adresses.  This trick doesn't appear to work in PCLinuxOS.
Regards longtom

PCLinuxOS KDE 32bit
Intel Core 2 Duo E2200 / 2.2 GHz
2GB Ram
Nvidia GT610

Offline longtom

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3339
  • Satellite Station Africa
Re: sharing windows network shares permanently
« Reply #8 on: April 19, 2010, 12:35:03 AM »
Sorry for waffling on - but this is really important to me.

When changing all addresses to ip addresses the error message reads:

Code: [Select]
mount error(113): No route to host
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

When I go to my samba shares in Dolphin they are all there, visible and accessible - apart from Oo files.  The Oo files are the main reason I do this exercise.  Otherwise I can not edit Oo or MS office files on the LAN network.  
« Last Edit: April 19, 2010, 04:30:08 AM by longtom »
Regards longtom

PCLinuxOS KDE 32bit
Intel Core 2 Duo E2200 / 2.2 GHz
2GB Ram
Nvidia GT610

Offline longtom

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3339
  • Satellite Station Africa
Re: sharing windows network shares permanently
« Reply #9 on: April 19, 2010, 04:52:58 AM »
Hoping to add clues to solving the puzzle;

when I type:
Code: [Select]
mount -t cifs //192.168.1.122/cheetah /media/cheetah

I get asked for the password and cheetah is mounted.  How to get that going in fstab without the password?

Regards longtom

PCLinuxOS KDE 32bit
Intel Core 2 Duo E2200 / 2.2 GHz
2GB Ram
Nvidia GT610

Offline longtom

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3339
  • Satellite Station Africa
Re: sharing windows network shares permanently
« Reply #10 on: April 19, 2010, 07:57:08 AM »
Don't no if anybody is still listening ...

There is some success as well as some new ... funny behaviour.

I got my fstab going after some intensive research.  Apparently there is some misbehaviour  between the newer kernels and cifs.  To circumvent this it is enough to add a domain to your fstab entry.
So this:
Code: [Select]
//192.168.1.123/Tiger /media/tiger cifs guest,uid=1000,iocharset=utf8,codepage=unicode,unicode,umask=777 0 0

becomes

Code: [Select]
//192.168.1.123/Tiger /media/tiger cifs domain=workgroup,guest,uid=1000,iocharset=utf8,codepage=unicode,unicode,umask=777 0 0

provided "workgroup" is your domain.

mount -a works and all is there.  Good - solved.

But...

Now my permanent mounts are not mounted when my PC starts.  Only once I do a mount -a as superuser are my permanent shares mounted.  As if PCLinuxOS ignores my fstab (or that part of it).  But it is there and seemingly fine when one types mount -a.

Any ideas how to repair that one?

Any suggestions welcome...
 
Regards longtom

PCLinuxOS KDE 32bit
Intel Core 2 Duo E2200 / 2.2 GHz
2GB Ram
Nvidia GT610

Offline muungwana

  • Hero Member
  • *****
  • Posts: 6268
Re: sharing windows network shares permanently
« Reply #11 on: April 19, 2010, 08:30:28 AM »

people are following your effort and we appreciate  you sharing your info as you seek to solve this problem.

An attempt to mount network shares seem to be made before the network is up and somebody else already discovered this in this thread: http://www.pclinuxos.com/forum/index.php/topic,70922.msg582594.html#msg582594

Your problem could be caused by the same underlying problem. Can you try to add "mount -a" as the last command in "/etc/rc.local" and see it it will help. Can you also add a delay and he did the problem persist.
.. 3 things are certain in life : death, taxes and software bloat ..
.. tell me something i don't know, something i can use as i struggle to reason with the world around me ..

Offline longtom

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3339
  • Satellite Station Africa
Re: sharing windows network shares permanently
« Reply #12 on: April 20, 2010, 03:31:56 AM »

people are following your effort and we appreciate  you sharing your info as you seek to solve this problem.

An attempt to mount network shares seem to be made before the network is up and somebody else already discovered this in this thread: http://www.pclinuxos.com/forum/index.php/topic,70922.msg582594.html#msg582594

Your problem could be caused by the same underlying problem. Can you try to add "mount -a" as the last command in "/etc/rc.local" and see it it will help. Can you also add a delay and he did the problem persist.


That worked very good - thank you!  Everything is now shared on startup.

But while I have you on the line.  My fstab looks like this:

Code: [Select]
//192.168.1.122/Cheetah /media/cheetah cifs domain=workgroup,guest,rw,iocharset=utf8,nobrl,file_mode=0777,dir_mode=0777 0 0
//192.168.1.123/Tiger /media/tiger cifs domain=workgroup,guest,rw,iocharset=utf8,nobrl,file_mode=0777,dir_mode=0777 0 0
//192.168.1.121/crocs /media/crocs cifs domain=workgroup,guest,rw,iocharset=utf8,nobrl,file_mode=0777,dir_mode=0777 0 0
//192.168.1.121/Birdies /media/birds cifs domain=workgroup,guest,rw,iocharset=utf8,nobrl,file_mode=0777,dir_mode=0777 0 0
//192.168.1.120/Archive /media/archive cifs domain=workgroup,guest,rw,iocharset=utf8,nobrl,file_mode=0777,dir_mode=0777 0 0
//192.168.1.121/snakes /media/snakes cifs domain=workgroup,guest,rw,iocharset=utf8,nobrl,file_mode=0777,dir_mode=0777 0 0
//192.168.1.140/order\040book /media/Orderbook cifs domain=workgroup,guest,rw,iocharset=utf8,nobrl,file_mode=0777,dir_mode=0777 0 0
//192.168.1.125/Photos\040sort /media/Photosort cifs domain=workgroup,guest,rw,iocharset=utf8,nobrl,file_mode=0777,dir_mode=0777 0 0
//192.168.1.134/My\040Documents /media/Curio cifs domain=workgroup,guest,rw,iocharset=utf8,nobrl,file_mode=0777,dir_mode=0777 0 0

however - I can have only full access to 2 of the shares - the others I have limited access.  I have full access to all in superuser mode.  However - in the old days I didn't need to go that route. 
Windows shares are all fully shared on all machines.

Any ideas?
Regards longtom

PCLinuxOS KDE 32bit
Intel Core 2 Duo E2200 / 2.2 GHz
2GB Ram
Nvidia GT610

Offline longtom

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3339
  • Satellite Station Africa
Re: sharing windows network shares permanently
« Reply #13 on: April 20, 2010, 05:16:07 AM »
Never mind - it seems to have worked itself out - all is as it should.

Thanks for all the help - this is solved!
Regards longtom

PCLinuxOS KDE 32bit
Intel Core 2 Duo E2200 / 2.2 GHz
2GB Ram
Nvidia GT610