Page 1 of 1

[SOLVED] sharing files

Posted: Sat Jan 08, 2011 2:55 pm
by zebedeeboss
OK I have spent 2 hours trying to get a share visble on this machine from another running Linux mint Debian

Samba is installed, on both machines share is created in naut with guest login enabled

but I have no idea how to see it on this machine. when I go to network the other machine is not there

now I would have done \\namofserver in windows and seen available shares

Please how do I do it here... Thanks in advance Zeb

Re: sharing files

Posted: Sat Jan 08, 2011 3:15 pm
by willie42

Re: sharing files

Posted: Sat Jan 08, 2011 3:18 pm
by altair4
On the non-debian machine please post the output of the following commands:

Code: Select all

testparm -s
net usershare info --long
smbtree

Re: sharing files

Posted: Sat Jan 08, 2011 3:28 pm
by zebedeeboss
Hi thats the same sort of stuff I have been reading for a couple of hours and getting no where :(

I am going to uninstall everything and start again... for the second time

Thanks Zeb...

Re: sharing files

Posted: Sat Jan 08, 2011 3:32 pm
by zebedeeboss
altair4 wrote:On the non-debian machine please post the output of the following commands:

Code: Select all

testparm -s
net usershare info --long
smbtree
Hi they are both linux debian machines, thats what I find so confusing... should be straight forward ??

Re: sharing files

Posted: Sat Jan 08, 2011 3:36 pm
by altair4
Do it on the machine that has the shares you just created.

Re: sharing files

Posted: Sat Jan 08, 2011 3:52 pm
by zebedeeboss
altair4 wrote:Do it on the machine that has the shares you just created.
I'll be right with you... I have messed around so much, I am just re-installing OS to start afresh :)

Overkill I know but.... doesn't take that long

Brb (Hopefully) [ps. this is the main machine, other is a test machine, I am trying to learn this stuff slowly and appreciate al the help you guys n gals offer]

Zeb...

Re: sharing files

Posted: Sat Jan 08, 2011 4:26 pm
by zebedeeboss
Hi Back again... here is the output

robert@wood-server ~ $ testparm -s
Load smb config files from /etc/samba/smb.conf
rlimit_max: rlimit_max (1024) below minimum Windows limit (16384)
Processing section "[homes]"
Processing section "[printers]"
Processing section "[print$]"
Loaded services file OK.
Server role: ROLE_STANDALONE
[global]
server string = %h server
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
dns proxy = No
usershare allow guests = Yes
panic action = /usr/share/samba/panic-action %d

[homes]
comment = Home Directories
valid users = %S
create mask = 0700
directory mask = 0700
browseable = No

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

[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
robert@wood-server ~ $ net usershare info --long
[tvshowsv]
path=/media/TV Odds II/TVShowsV
comment=
usershare_acl=Everyone:F,
guest_ok=y


WORKGROUP
\\WOODQUAD woodquad server
\\WOODQUAD\EPSON-Stylus-DX6000 EPSON Stylus DX6000
\\WOODQUAD\Print_to_PDF Print to a PDF File
\\WOODQUAD\IPC$ IPC Service (woodquad server)
\\WOODQUAD\print$ Printer Drivers
\\WOOD-SERVER wood-server server
\\WOOD-SERVER\tvshowsv
\\WOOD-SERVER\Print_to_PDF Print to a PDF File
\\WOOD-SERVER\IPC$ IPC Service (wood-server server)
\\WOOD-SERVER\print$ Printer Drivers


probably pasted stuff not needed bit I am a newb

Thanks Zeb...

Re: sharing files

Posted: Sat Jan 08, 2011 4:34 pm
by altair4
The smbtree error can be fixed by doing what the error message says. As long as your there you might want to make sure other smb clinet related packages are installed:

Code: Select all

 sudo apt-get install gvfs-fuse
sudo apt-get install libsmbclient
sudo apt-get install smbclient
sudo apt-get install python-smbc
Then add yourself to the fuse group:

Code: Select all

sudo gpasswd -a your-user-name fuse
Then Logoff and Login again for all the group change to take affect

Then run smbtree again please.

So far there doesn't appear to be anything wrong with your basic config files assuming /media/TV Odds II/TVShowsV isn't an NTFS or FAT32 partition and it hasn't got the correct permissions.

Re: sharing files

Posted: Sat Jan 08, 2011 4:42 pm
by altair4
Posted past each other it seems.

Everything looks good from this end. The only box that has a share at the moment is WOOD-SERVER.

Open a terminal on WOOD-SERVER and type:

Code: Select all

nautilus smb://wood-server
Can you access your own share from that machine? If not what error does it give you?

If there are no errors do the same thing using the same command ( nautilus smb://wood-server ) from WOODQUAD.

Re: sharing files

Posted: Sat Jan 08, 2011 4:55 pm
by zebedeeboss
Hi ok on wood-server it brings up the nautilus screen but when I double click on the tvshowsv it says unable to mount location failed to mount windows share

on the wood-quad machine I get could not display failed to retrieve share list from server

Re: sharing files

Posted: Sat Jan 08, 2011 5:03 pm
by altair4
A "failed to mount - unable to mount ..." error is usually a Linux permissions error not a Samba error.

From wood-server what is the output of:

Code: Select all

ls -dl "/media/TV Odds II/TVShowsV"

Re: sharing files

Posted: Sat Jan 08, 2011 5:05 pm
by zebedeeboss
Hi

drwx------ 1 robert robert 0 Oct 10 06:34

so looks like file permissions are wrong?

Re: sharing files

Posted: Sat Jan 08, 2011 5:12 pm
by altair4
Yep. We can fix that but it can get somewhat involed and takes us away from the problem at hand so let's use samba itself to work around this problem.

On wood-server edit smb.conf as root:

Code: Select all

gksu gedit /etc/samba/smb.conf
Add the following line to the global section of smb.conf:

Code: Select all

force user = robert
Save the file and restart samba:

Code: Select all

sudo service samba restart
Since "robert" is the only one who can access the partition then "force user" will create a mask that will convert the "guest" user to robert - at least as far as your shares are concerned.

Once that's done run the nautilus smb:// command again on wood-server and make sure the error goes away.

You might be lucky - it might also work from wood-quad. But that's a different error.

Re: sharing files

Posted: Sat Jan 08, 2011 5:19 pm
by zebedeeboss
Hi altair4

that worked on wood-server share comes up and I can enter the share and see the files within :D

wood-quad still says could not display "smb://wood-server"
Error: Failed to retrieve share list from server
Please select another viewer and try again

Zeb...

Re: sharing files

Posted: Sat Jan 08, 2011 5:33 pm
by altair4
Sorry for prolonging this but I'm trying to do this in a methodical way so I don't miss anything.

From wood-quad change the smb:// command from machine name to ip address:

Code: Select all

nautilus smb://wood-server's ip address
If you still can't get through then do the following:

(a) Install nmap on wood-quad

Code: Select all

sudo apt-get install nmap
(b) Run the following command:

Code: Select all

sudo nmap -sS -sU -T4 192.168.0.100
Run it twice substituting 192.168.0.100 with the ip address of wood-server and again with wood-quad.
You need to verify that both machines have the following ports open:
139/tcp open netbios-ssn
445/tcp open microsoft-ds
137/udp open|filtered netbios-ns
138/udp open|filtered netbios-dgm
If you can get through by ip address then I would like you to make a change to the smb.conf file on wood-quad:
Add a line to the global section:

Code: Select all

name resolve order = bcast host lmhosts wins
Save the file, restart samba, wait a few minutes and try to access wood-server by name.

Re: sharing files

Posted: Sat Jan 08, 2011 5:40 pm
by zebedeeboss
Hi Altair4

appreciate all the help and knowledge you are giving me... ip address worked fine :D :D :D

goes into share and I can see the individual files... I can also watch them from wood-quad

so rather than running that command in terminal every time, I would like them to mount that share each time wood-quad has to restart so they are just there available in computer

Zeb...

Re: sharing files

Posted: Sat Jan 08, 2011 5:53 pm
by altair4
The only problem you might have is that wood-server may not have that ip address the next tine it boots unless you've given it a static ip address.

To answer your question though you could auto mount it this way:
Auto Mount Samba Shares on Boot ( GVFS Method ): http://forums.linuxmint.com/viewtopic.php?f=42&t=42713
Just make sure you specify it by ip address and not machine name.

You can also use a GUI to do all this:
Using Gigolo to Mount Remote Samba Shares: http://forums.linuxmint.com/viewtopic.php?f=42&t=52144
You will have to deviate from that howto a bit though and instead of "Step 3: Browsing" use the "Connect" button and specify the server by ip address instead.

The advantage of the Gigolo method is that it will probe the network for that ip address and mount it when it's up. With the first method if wood-server isn't running when wood-quad is booted, the script will run and fail to mount.

EDIT: Going to have to leave you for a bit. I've been married for a very long time and I am not the master of my fate on the weekends. :wink:

Re: sharing files

Posted: Sat Jan 08, 2011 5:59 pm
by zebedeeboss
altair4... you're awesome thank you very much

both machines are tied down in router to same ip address

so I should be fine with the two methods you have shown me

Thank You Very Much

Zeb...