Page 1 of 1
[SOLVED] LMDE2 and Samba
Posted: Sun Jun 11, 2017 9:11 am
by Nubetastic
I try to share a folder, and it creates the file in usershare but does not show on the network. The printer folder is showing for the computer, but no the folder i set to share.
The smb.conf is default. I downloaded the newest link and installed it in virtual box.
Solution to my issue.
Code: Select all
sudo chmod 1770 /var/lib/samba/usershares
Reinstalled LMDE 2 Cinnamon in virtual box to go through samba setup for anyone else having samba issues in LMDE2 Cinnamon. Thanks to Altair4.
Full Update
Installed Samba
Added user to sambashare group (logout or restart after)
Added user to samba
If you cannot login to the share try. I did not try before doing this but it was not mentioned below in Altair4’s notes when he did his setup.
You should now be able to right click a folder, and select “Sharing Options” or “Properties” to set the folder to share.
Re: LMDE2 and Samba
Posted: Sun Jun 11, 2017 9:41 am
by altair4
I do not use LMDE. I do not know what peculiarities exist in LMDE. So assuming Samba is Samba:
[1] What desktop environment are you using: Cinnamon or MATE?
[2] What is the operating system of the machine that is trying to access this machine?
If it's Windows or a mix of OS's go through the checklist first:
Samba Browsing Problems Checklist
If it's another Linux box, a macOS box, or a Windows 10 box:
Open a terminal and type the following to get the exact host name of your machine:
Then on the client machines use that hostname with a
.local
attached at the end. So if the ohter machine uses Mint Cinnamon open a terminal and type:
nemo smb://hostname.local
replacing "hostname" with the correct name.
Should none of that work please post the output of the following commands:
Re: LMDE2 and Samba
Posted: Sun Jun 11, 2017 2:12 pm
by Nubetastic
[1] Cinnamon
[2] Linux Mint 18, Cinnamon
I am trying to see the shares of the Cinnamon LMDE 2 on both OSes. I can see the print share from LMDE on both OSes but not the folder i set to share through Nemo.
hostname
nemo smb://tom-pc.local, shows print$ only.
net usershare info --long
Code: Select all
[Public]
path=/home/tom/Public
comment=
usershare_acl=Everyone:R,TOM-PC\tom:F,
guest_ok=n
I added user tom and enabled it for samba. I added tom to user group sambashare, and set the needed folder group permissions for sambashare. I also had to install samba, using the gui software manager.
I have a share on my mint 18 OS and i can see and access it just fine from both OSes. I am just trying to get the rolling LMDE release to fit my needs and samba share is one of them.
Re: LMDE2 and Samba
Posted: Sun Jun 11, 2017 5:54 pm
by altair4
There's nothing wrong with the share definition and tom-pc.local works - at least you can see the server and the default print share. So what about testparm -s
Re: LMDE2 and Samba
Posted: Sun Jun 11, 2017 7:15 pm
by Nubetastic
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 "[homes]"
Processing section "[printers]"
Processing section "[print$]"
Loaded services file OK.
WARNING: state directory /var/lib/samba should have permissions 0755 for browsing to work
Server role: ROLE_STANDALONE
# Global parameters
[global]
server role = standalone 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
idmap config * : backend = tdb
[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
print ok = Yes
browseable = No
[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
I tried using Mint 18 smb.conf instead but get the same issue.
Re: LMDE2 and Samba
Posted: Mon Jun 12, 2017 7:07 am
by altair4
It looks like I will have to actually install LMDE to see if I can reproduce your symptoms since I can't from a Live session.
You might want to fix this error message since that one I can reproduce :
WARNING: state directory /var/lib/samba should have permissions 0755 for browsing to work
More of an FYI but you have a [homes] share enabled. The way this works when you have another linux machine as client is to specify the host then the LMDE user name as the share name. Like this:
Just don't forget to add tom to the samba password database - on the LMDE machine:
Re: LMDE2 and Samba
Posted: Mon Jun 12, 2017 7:18 am
by mike acker
consider me added to the Interested Parties list
i have never been able to get Samba to work . i think we need an alternative that doesn't use any windows stuff -- workgroups -- etc
Re: LMDE2 and Samba
Posted: Mon Jun 12, 2017 7:22 am
by altair4
mike acker wrote:consider me added to the Interested Parties list
i have never been able to get Samba to work . i think we need an alternative that doesn't use any windows stuff -- workgroups -- etc
Why not start your own thread. Post the output of the following commands so we can see how you are set up and what you've already done:
And you can run Samba without any "Windows stuff".
Re: LMDE2 and Samba
Posted: Mon Jun 12, 2017 8:33 am
by altair4
So this is what I did:
** Installed LMDE2 and updated it.
** Installed samba:
sudo apt install samba
** Made myself a member of the sambashare group:
sudo gpasswd -a tester sambashare
Why LMDE does not make you a member of this group by default is a mystery.
** Logged out and back again so the new group membership would take affect.
** Created a share of my Public folder using Nemo - I made it a fully public share allowing guest access.
** Accessed the share from Xubuntu:
thunar smb://vlmde2.local/public
So far I can't reproduce your error.
Special note to Mike Acker: I just did this without any "Microsoft Stuff" - No workgroups, no master browser, no netbios, no nothin' Microsoft related.
Then I went about trying to break it.
Did this:
sudo chmod 0777 /var/lib/samba
And got this warning in testparm:
WARNING: state directory /var/lib/samba should have permissions 0755 for browsing to work
. But that wasn't enough to break it.
But then I thought about this a bit ( it happens to me sometimes ) and on a hunch did the same thing to a subfolder:
sudo chmod 0777 /var/lib/samba/usershares
And as me mum used to say: Bingo! I can only see the print$ share. I could not access it with a
thunar smb://vlmde2.local/public
- although I can access my home folder:
thunar smb://vlmde2.local/tester
because that is defined in smb.conf and is not a usershare.
Setting /var/lib/samba/usershares to 0777 breaks usershares. Set it back where it belongs:
Code: Select all
sudo chmod 1770 /var/lib/samba/usershares
If you run the following command:
Code: Select all
stat -c "%a %n %U %G" /var/lib/samba/usershares
It should come back with this:
1770 /var/lib/samba/usershares root sambashare
Re: LMDE2 and Samba
Posted: Mon Jun 12, 2017 5:32 pm
by Nubetastic
you solved my issue thank you. I updated my first post with solution.