Share folders like in Windows [SOLVED]

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
puffin617

Share folders like in Windows [SOLVED]

Post 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
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times 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: [Need help] Share folders like in Windows

Post 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.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
puffin617

Re: [Need help] Share folders like in Windows

Post 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...
altair4
Level 20
Level 20
Posts: 11419
Joined: Tue Feb 03, 2009 10:27 am

Re: [Need help] Share folders like in Windows

Post by altair4 »

Why did you install Nautilus? What version of Mint are you using?
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
puffin617

Re: [Need help] Share folders like in Windows

Post by puffin617 »

Mint 14 MATE
altair4
Level 20
Level 20
Posts: 11419
Joined: Tue Feb 03, 2009 10:27 am

Re: [Need help] Share folders like in Windows

Post 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.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
puffin617

Re: [Need help] Share folders like in Windows

Post 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...
altair4
Level 20
Level 20
Posts: 11419
Joined: Tue Feb 03, 2009 10:27 am

Re: [Need help] Share folders like in Windows

Post 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.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
altair4
Level 20
Level 20
Posts: 11419
Joined: Tue Feb 03, 2009 10:27 am

Re: [Need help] Share folders like in Windows

Post by altair4 »

Please post the output of the following command:

Code: Select all

testparm -s
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
puffin617

Re: [Need help] Share folders like in Windows

Post 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
altair4
Level 20
Level 20
Posts: 11419
Joined: Tue Feb 03, 2009 10:27 am

Re: [Need help] Share folders like in Windows

Post 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] ?
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
puffin617

Re: [Need help] Share folders like in Windows

Post 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"
altair4
Level 20
Level 20
Posts: 11419
Joined: Tue Feb 03, 2009 10:27 am

Re: [Need help] Share folders like in Windows

Post 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.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
puffin617

Re: [Need help] Share folders like in Windows

Post 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
puffin617

Re: [Need help] Share folders like in Windows

Post by puffin617 »

Now what?
altair4
Level 20
Level 20
Posts: 11419
Joined: Tue Feb 03, 2009 10:27 am

Re: [Need help] Share folders like in Windows

Post 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.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
puffin617

Re: [Need help] Share folders like in Windows

Post by puffin617 »

Finally :)

Thanx :)

What was wrong?
altair4
Level 20
Level 20
Posts: 11419
Joined: Tue Feb 03, 2009 10:27 am

Re: [Need help] Share folders like in Windows

Post 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?
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
jeremiah.putnam

Re: Share folders like in Windows [SOLVED]

Post by jeremiah.putnam »

Thanks so much. I have been trying to figure this out for months!!
metralha761

Re: Share folders like in Windows [SOLVED]

Post 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 :)
Locked

Return to “Networking”