Networking Observation about Samba and plea for help <resolved>

Connection sharing, Firewall, Samba..etc
Forum rules
Before you post please read how to get help
Post Reply
waynus
Level 1
Level 1
Posts: 28
Joined: Wed Dec 23, 2015 4:22 am

Networking Observation about Samba and plea for help <resolved>

Post by waynus » Thu Dec 28, 2017 11:24 pm

I switched some time ago (2 years ago now)from Windows to Linux Mint and the experience has been great.

For any use other than games Linux has been the superior O.S by a mile. With one exception, networking.

It used to be a struggle back in the earlier days of Linux to get networking happening. Today however it SHOULD be a no-brainer with every home and office having multiple networked devices.

BUT it isn't. My last version 17.3 was an incredible struggle that I just gave up on, I figured given time this problem with sharing from a Linux Mint machine would be fixed. Clearly it hasn't been. I have battled for several days to get Samba working and it just doesn't. Yes I have tried numerous suggestions and "fixes" . It really isn't ok that file sharing in 2017 still doesn't just work out of the box.

My next step is to look into other versions of Linux, to find one that works in a straight forward way. It has prevented me from recommending Linux Mint to my friends as all them would expect such a basic feature to be there and working on install.

My question, can anyone point to a straight forward guide to getting networking up and running on Mint 18.3? All i want to do is to read shared directories and share directories to machines running multiple operating systems.
Last edited by waynus on Sat Dec 30, 2017 5:46 pm, edited 2 times in total.

waynus
Level 1
Level 1
Posts: 28
Joined: Wed Dec 23, 2015 4:22 am

Re: networking Observation

Post by waynus » Fri Dec 29, 2017 12:49 am

Well third time around and i got much further.

The shares can be seen in windows, android media centre mac os and mint 17.2.

Won't allow any user to login. Users are valid users on the 18.3 box and valid samba users.

Any ideas or help would be much appreciated.

Thank you.

blockhead47
Level 2
Level 2
Posts: 72
Joined: Wed Jun 15, 2016 4:50 pm
Location: Chicago, IL, USA

Re: Networking Observation about Samba and plea for help

Post by blockhead47 » Fri Dec 29, 2017 10:59 am

Show us the output of the command.

Code: Select all

testparm

altair4
Level 18
Level 18
Posts: 8994
Joined: Tue Feb 03, 2009 10:27 am

Re: Networking Observation about Samba and plea for help

Post by altair4 » Fri Dec 29, 2017 11:40 am

Since you didn't mention which Mint 18.3 you are using ( Cinnamon, MATE, XFCE, or the other one ) you might want to post the output of this command as well:

Code: Select all

net usershare info --long
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

waynus
Level 1
Level 1
Posts: 28
Joined: Wed Dec 23, 2015 4:22 am

Re: Networking Observation about Samba and plea for help

Post by waynus » Fri Dec 29, 2017 3:07 pm

Thanks for the offer to help, its cinnamon by the way.

1) testparm:
wayne@wayne-P55-USB3 ~ $ testparm
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
WARNING: The "syslog" option is deprecated
Processing section "[printers]"
Processing section "[print$]"
Processing section "[Finished]"
Loaded services file OK.
Server role: ROLE_STANDALONE

Press enter to see a dump of your service definitions

# Global parameters
[global]
server string = %h server (Samba, Ubuntu)
server role = standalone server
security = USER
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* .
username map = /etc/samba/smbusers
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
browseable = No


[print$]
comment = Printer Drivers
path = /var/lib/samba/printers


[Finished]
path = /media/wayne/Seagate Expansion Drive/Finished
read only = No
guest ok = Yes

2) net usershare info --long

Displays nothing.
Not a command I am familiar with but I assume it is meant to display shares of various users.



Any help appreciated

altair4
Level 18
Level 18
Posts: 8994
Joined: Tue Feb 03, 2009 10:27 am

Re: Networking Observation about Samba and plea for help

Post by altair4 » Fri Dec 29, 2017 6:39 pm

[Finished]
path = /media/wayne/Seagate Expansion Drive/Finished
read only = No
guest ok = Yes
The problem isn't Samba it's Linux.

/media/wayne was created by the system in such a way that only one user can traverse that directory and that user is wayne. The guest user isn't wayne so despite Samba allowing him access to Seagate Expansion Drive/Finished Linux prevents it.

One soulution is to make the the guest appear appear to be wayne - at least for that one share:
[Finished]
path = /media/wayne/Seagate Expansion Drive/Finished
read only = No
guest ok = Yes
force user = wayne
Then restart samba:

Code: Select all

sudo service smbd restart
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

waynus
Level 1
Level 1
Posts: 28
Joined: Wed Dec 23, 2015 4:22 am

Re: Networking Observation about Samba and plea for help

Post by waynus » Fri Dec 29, 2017 8:11 pm

Thank you that worked just fine.

So to avoid this problem I need to create the share from a different user or change ownership?

altair4
Level 18
Level 18
Posts: 8994
Joined: Tue Feb 03, 2009 10:27 am

Re: Networking Observation about Samba and plea for help

Post by altair4 » Sat Dec 30, 2017 8:45 am

Using the force user = $USER option has become standard practice in normal home networks so there's nothing out of the ordinary in this solution. In fact some folks place the force user operative in the [global] sections of smb.conf so that it will apply to all future shares that are created.

It will not help much having it mount under a different user since it will just require you to change the "force user" to that user.

The one thing I would not recommend is messing with the permissions of /media/wayne itself. The system creates that folder and some future update to the system may just revert permissions back to the where it wanted it in the first place.

Note on "force user": This operative is invoked after credentials are passed so you could create a share like this if you wanted to limit access to specific users:
[Finished]
path = /media/wayne/Seagate Expansion Drive/Finished
read only = No
valid users = wayne, altair, agnes
force user = wayne
valid users will limit access to those on the list but once their credentials are accepted everything they do will be as wayne.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

waynus
Level 1
Level 1
Posts: 28
Joined: Wed Dec 23, 2015 4:22 am

Re: Networking Observation about Samba and plea for help

Post by waynus » Sat Dec 30, 2017 5:45 pm

Thank you for all the help.

Post Reply

Return to “Other networking topics”