Page 1 of 1

Share folders like in Windows [SOLVED]

Posted: Thu Feb 14, 2013 12:20 pm
by puffin617
Hi,

When I share folders in Wndows 7 to "Everyone", I can access them with my phone via the Wifi router.

How do I achieve this on Linux?

Regards,
B

Re: [Need help] Share folders like in Windows

Posted: Thu Feb 14, 2013 12:30 pm
by altair4
I don't know I've never tied to do that. From your description though it sounds like the phone has a samba client on it. If that's the case then you can create a share just like windows:

Simple File Sharing in Mint: http://forums.linuxmint.com/viewtopic.php?f=42&t=23169

That will take care of creating a share on Mint but I have no idea how the phone will connect to it.

Re: [Need help] Share folders like in Windows

Posted: Thu Feb 14, 2013 12:35 pm
by puffin617
The phone connects as a samba client indeed - just not sure how to share as Samba - will check link thanx :)

PS: After installing Nautilus I cannot find it...

Re: [Need help] Share folders like in Windows

Posted: Thu Feb 14, 2013 12:41 pm
by altair4
Why did you install Nautilus? What version of Mint are you using?

Re: [Need help] Share folders like in Windows

Posted: Thu Feb 14, 2013 12:43 pm
by puffin617
Mint 14 MATE

Re: [Need help] Share folders like in Windows

Posted: Thu Feb 14, 2013 12:45 pm
by altair4
Lordy, I can't keep up with these versions. I think the file manager is called Caja in Mate. It's your Home folder.

Re: [Need help] Share folders like in Windows

Posted: Thu Feb 14, 2013 12:46 pm
by puffin617
I've tried using the conventional right-clock and share but the phone moans about permissions and I cannot get the permission set...

Re: [Need help] Share folders like in Windows

Posted: Thu Feb 14, 2013 12:48 pm
by altair4
I'm sorry. There is so Samba Usershare in MATE so the HowTo I pointed you to won't be of much help.

You can still create a share from the Caja file manager but it's different from what you can do on Gnome or Cinnamon.

Re: [Need help] Share folders like in Windows

Posted: Thu Feb 14, 2013 12:49 pm
by altair4
Please post the output of the following command:

Code: Select all

testparm -s

Re: [Need help] Share folders like in Windows

Posted: Thu Feb 14, 2013 2:12 pm
by puffin617

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$]"
Loaded services file OK.
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
	dns proxy = No
	usershare allow guests = Yes
	panic action = /usr/share/samba/panic-action %d
	idmap config * : backend = tdb

[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

Re: [Need help] Share folders like in Windows

Posted: Thu Feb 14, 2013 2:19 pm
by altair4
I'm confused. You have no shares defined but you posted this:
I've tried using the conventional right-clock and share but the phone moans about permissions and I cannot get the permission set...
If you open Caja and right click say your Public folder > "Share folder" and then run "testparm -s" again does it not show the share [Public] ?

Re: [Need help] Share folders like in Windows

Posted: Thu Feb 14, 2013 2:25 pm
by puffin617
I don't know what you mean by Public Folder. I want to share a folder on one of my drives. I right click, choose Share Folder and then choose smb...

It show on phone but I canjnot enter the folder because of permissions and I cannot set the permissions with caja...

It says "the account has no permissions"

Re: [Need help] Share folders like in Windows

Posted: Thu Feb 14, 2013 2:28 pm
by altair4
The output of the testparm command on your Mint machine would show all the folders you have shared and according to the output you posted you have none.

Re: [Need help] Share folders like in Windows

Posted: Thu Feb 14, 2013 2:30 pm
by puffin617

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 "[Application Backups]"
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
	dns proxy = No
	usershare allow guests = Yes
	panic action = /usr/share/samba/panic-action %d
	idmap config * : backend = tdb

[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

[Application Backups]
	path = /media/puffin617/Apps/Application Backups
	read only = No
	guest ok = Yes

Re: [Need help] Share folders like in Windows

Posted: Thu Feb 14, 2013 2:34 pm
by puffin617
Now what?

Re: [Need help] Share folders like in Windows

Posted: Thu Feb 14, 2013 2:35 pm
by altair4
Edit smb.conf as root:

Code: Select all

gksu pluma /etc/samba/smb.conf
Add a line right under the workgroup line towards the top of the file that looks like this:

Code: Select all

force user = puffin617
Then restart samba:

Code: Select all

sudo service smbd restart
Now here's the thing. Every time you restart samba the network has a fit so wait a few minutes for things to settle down and then try to access the share again.

Re: [Need help] Share folders like in Windows

Posted: Thu Feb 14, 2013 2:38 pm
by puffin617
Finally :)

Thanx :)

What was wrong?

Re: [Need help] Share folders like in Windows

Posted: Thu Feb 14, 2013 2:47 pm
by altair4
Ubuntu has conspired with the forces of evil to make sharing of partitions mounted to /media/your-user-name almost impossible. The permissions on that folder will only allow "your-user-name " access. "force user = "your-user-name " makes the remote user look like you so you can now get through.

Just out of curiosity is this an iOS or Android phone?

Re: Share folders like in Windows [SOLVED]

Posted: Tue May 21, 2013 8:31 pm
by jeremiah.putnam
Thanks so much. I have been trying to figure this out for months!!

Re: Share folders like in Windows [SOLVED]

Posted: Fri Jun 28, 2013 6:32 pm
by metralha761
Hello there!

After a search I found the reason to can't login using samba, you need to add the user to database of samba.

To add a real user to samba you do:

Code: Select all

sudo smbpasswd -a <user>
After that, all works smoothly :)