[SOLVED]Samba issues - can't select guest access in gui and unsure how to password protect

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
newmintuser2020
Level 1
Level 1
Posts: 5
Joined: Sun Jul 05, 2020 11:26 am

[SOLVED]Samba issues - can't select guest access in gui and unsure how to password protect

Post by newmintuser2020 »

Hi, I had been successfully sharing folders with my Win10 machine using the gui (nemo extension), the problem was I couldn't work how how to password protect these files

I would get this message
Image

But I didn't know the username or password or how to set it.


I tried a few things to no avail, so this is still an issue but now I have another issue in that the guest access option in the gui is now permanently greyed out
Image

On folders that already had it checked it is still checked but can't be unchecked (and vice-versa) but on new folders I try to share it is unchecked and can't be checked. I'm not sure what I did to change this but I did try uninstalling and reinstalling the Samba programs in the software manager in an attempt to reset the software files.


So essentially I have 2 issues:
1) I can't allow guest access.
2) I can't password protect shares.

Thanks.
Last edited by newmintuser2020 on Sun Jul 05, 2020 5:46 pm, edited 1 time in total.

altair4
Level 20
Level 20
Posts: 10126
Joined: Tue Feb 03, 2009 10:27 am

Re: Samba issues - can't select guest access in gui and unsure how to password protect

Post by altair4 »

But I didn't know the username or password or how to set it.
You can use your own user name. But unlike Windows samba has to be told what the password is and you do that with this command sequence:

Code: Select all

sudo smbpasswd -a altair
Replace altair with your own Mint user name.
The guest access option in the gui is now permanently greyed out
That's a different problem ... um .... There is a setting in smb.conf that can disable it but you would have to go out of your way to make that happen.

Please post the out put of the following commands:

Code: Select all

testparm -s

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.

newmintuser2020
Level 1
Level 1
Posts: 5
Joined: Sun Jul 05, 2020 11:26 am

Re: Samba issues - can't select guest access in gui and unsure how to password protect

Post by newmintuser2020 »

altair4 wrote:
Sun Jul 05, 2020 3:00 pm
But I didn't know the username or password or how to set it.
You can use your own user name. But unlike Windows samba has to be told what the password is and you do that with this command sequence:

Code: Select all

sudo smbpasswd -a altair
Replace altair with your own Mint user name.
The guest access option in the gui is now permanently greyed out
That's a different problem ... um .... There is a setting in smb.conf that can disable it but you would have to go out of your way to make that happen.

Please post the out put of the following commands:

Code: Select all

testparm -s

Code: Select all

net usershare info --long
After

Code: Select all

sudo smbpasswd -a alexander


I get

Code: Select all

Unknown parameter encountered: "password level"
Ignoring unknown parameter "password level"
Unknown parameter encountered: "update encrypted"
Ignoring unknown parameter "update encrypted"
Unknown parameter encountered: "winbind trusted domains only"
Ignoring unknown parameter "winbind trusted domains only"
New SMB password:
Retype new SMB password:
Then when I enter it on the Windows system it's now recognizing the username but it says "the specified password is not correct" despite the fact that I'm typing exactly what I just set.


I googled this and from this https://superuser.com/questions/1125438 ... amba-share added

Code: Select all

ntlm auth = true
to the end of the smb.conf file but it didn't help.

Here are the outputs you requested:

Code: Select all

testparm -s
Load smb config files from /etc/samba/smb.conf
WARNING: The "null passwords" option is deprecated
Unknown parameter encountered: "password level"
Ignoring unknown parameter "password level"
WARNING: The "encrypt passwords" option is deprecated
WARNING: The "client schannel" option is deprecated
WARNING: The "server schannel" option is deprecated
Unknown parameter encountered: "update encrypted"
Ignoring unknown parameter "update encrypted"
WARNING: The "idmap uid" option is deprecated
WARNING: The "idmap gid" option is deprecated
Unknown parameter encountered: "winbind trusted domains only"
Ignoring unknown parameter "winbind trusted domains only"
Global parameter ntlm auth found in service section!
Loaded services file OK.
WARNING: socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
This warning is printed because you set one of the
following options: SO_SNDBUF, SO_RCVBUF, SO_SNDLOWAT,
SO_RCVLOWAT
Modern server operating systems are tuned for
high network performance in the majority of situations;
when you set 'socket options' you are overriding those
settings.
Linux in particular has an auto-tuning mechanism for
buffer sizes (SO_SNDBUF, SO_RCVBUF) that will be
disabled if you specify a socket buffer size. This can
potentially cripple your TCP/IP stack.

Getting the 'socket options' correct can make a big
difference to your performance, but getting them wrong
can degrade it by just as much. As with any other low
level setting, if you must make changes to it, make
 small changes and test the effect before making any
large changes.

Server role: ROLE_STANDALONE

# Global parameters
[global]
	add group script = /usr/sbin/groupadd '%g'
	add machine script = /usr/sbin/useradd -d /dev/null -g sambamachines -c 'Samba Machine Account' -s /dev/null -M '%u'
	add user script = /usr/sbin/useradd -d /dev/null -c 'Samba User Account' -s /dev/null '%u'
	add user to group script = /usr/sbin/useradd -d /dev/null -c 'Samba User Account' -s /dev/null -g '%g' '%u'
	allow trusted domains = No
	bind interfaces only = Yes
	client schannel = No
	client signing = No
	client use spnego = No
	delete group script = /usr/sbin/groupdel '%g'
	delete user from group script = /usr/sbin/userdel '%u' '%g'
	delete user script = /usr/sbin/userdel '%u'
	dns proxy = No
	domain master = No
	guest account = smbguest
	idmap gid = 16777216-33554431
	idmap uid = 16777216-33554431
	interfaces = 127.0.0.1/8 192.168.0.0/24
	local master = No
	log file = /var/log/samba/samba.log
	logon drive = m:
	logon home = \\%L\homes\%u
	logon path = \\%L\profiles\%u
	logon script = %G.bat
	machine password timeout = 120
	max log size = 1000
	name resolve order = wins lmhosts bcast
	netbios name = SAMBA24
	obey pam restrictions = Yes
	os level = 33
	passwd chat = *New*password* %n\n *ReType*new*password* %n\n *passwd*changed*\n
	passwd chat timeout = 120
	passwd program = /usr/bin/passwd '%u'
	preferred master = No
	printcap name = cups
	remote announce = 192.168.0.255
	remote browse sync = 192.168.0.255
	security = USER
	server schannel = No
	server signing = No
	server string = Samba file and print server
	socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
	template shell = /dev/null
	unix password sync = Yes
	username level = 6
	username map = /etc/samba/smbusers
	winbind cache time = 360
	winbind nested groups = No
	winbind nss info = no
	winbind separator = @
	winbind use default domain = Yes
	idmap config * : range = 16777216-33554431
	idmap config * : backend = tdb
	cups options = raw
	follow symlinks = No
	hosts allow = 127. 192.168.0.


[homes]
	comment = Home Directories
	locking = No
	path = /home
	read only = No
	strict locking = No
	valid users = %U


[netlogon]
	comment = Network Logon Service
	locking = No
	path = /var/lib/samba/netlogon
	strict locking = No


[profiles]
	comment = User Profiles
	create mask = 0600
	directory mask = 0700
	locking = No
	path = /var/lib/samba/profiles
	read only = No
	strict locking = No


[printers]
	browseable = No
	comment = All Printers
	locking = No
	path = /var/spool/samba
	printable = Yes
	strict locking = No


[pdf-documents]
	admin users = %U
	comment = Converted PDF Documents
	guest ok = Yes
	locking = No
	path = /var/lib/samba/pdf-documents
	read only = No
	strict locking = No


[pdf-printer]
	comment = PDF Printer Service
	guest ok = Yes
	lpq command = 
	path = /tmp
	printable = Yes
	print command = /usr/bin/gadmin-samba-pdf %s %u
	printing = bsd
	use client driver = Yes

Code: Select all

net usershare info --long
Unknown parameter encountered: "password level"
Ignoring unknown parameter "password level"
Unknown parameter encountered: "update encrypted"
Ignoring unknown parameter "update encrypted"
Unknown parameter encountered: "winbind trusted domains only"
Ignoring unknown parameter "winbind trusted domains only"
Unknown parameter encountered: "password level"
Ignoring unknown parameter "password level"
Unknown parameter encountered: "update encrypted"
Ignoring unknown parameter "update encrypted"
Unknown parameter encountered: "winbind trusted domains only"
Ignoring unknown parameter "winbind trusted domains only"
[Pictures]
path=/home/alexander/Desktop/Pictures
comment=
usershare_acl=Everyone:R,Unix User@alexander:F,
guest_ok=y

[sharetest2]
path=/home/alexander/sharetest2
comment=
usershare_acl=Everyone:R,Unix User@alexander:F,
guest_ok=n

[sharetest]
path=/home/alexander/sharetest
comment=
usershare_acl=Everyone:F,
guest_ok=y

Thanks for your help, much appreciated.

altair4
Level 20
Level 20
Posts: 10126
Joined: Tue Feb 03, 2009 10:27 am

Re: Samba issues - can't select guest access in gui and unsure how to password protect

Post by altair4 »

You installed gadmin-samba didn't you. Go on ... admit it.

We need to start over - you don't do that with a reinstall of samba:

[1] Make a backup of your current smb.conf

Code: Select all

sudo mv /etc/samba/smb.conf /etc/samba/smb.conf.bak
(2) Copy a duplicate default smb.conf file to the working location:

Code: Select all

sudo cp -a /usr/share/samba/smb.conf /etc/samba/
(3) Restart samba

Code: Select all

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

newmintuser2020
Level 1
Level 1
Posts: 5
Joined: Sun Jul 05, 2020 11:26 am

Re: Samba issues - can't select guest access in gui and unsure how to password protect

Post by newmintuser2020 »

Haha how did you know? I read after the fact that I shouldn't have installed gadmin.

Thanks everything is working now, no more greyed out guest access check boxes and I have gotten into the private share on my windows machine.

Just as a test I made another private folder and was not prompted for a username and password, can I assume that once it has been entered once on that machine it remembers?

Thanks again.

So was the problem that gadmin changed the conf file? That is why I uninstalled all samba programs and reinstalled them (not including gadmin) to try and get the defaults back.

altair4
Level 20
Level 20
Posts: 10126
Joined: Tue Feb 03, 2009 10:27 am

Re: Samba issues - can't select guest access in gui and unsure how to password protect

Post by altair4 »

Just as a test I made another private folder and was not prompted for a username and password, can I assume that once it has been entered once on that machine it remembers?
Windows has a bad habit of remembering everything. If it successfully connects to a specific box with a specific username / password the darn thing will remember it in perpetuity.
So was the problem that gadmin changed the conf file?
I need to use my words carefully so as to not risk being banned from this forum ..... Yes, it was gadmin-samba that ... um ... messed things up. It was bulit for a version of samba that was state of the art when Jimmy Carter was president. It needs to be removed from the repositories. That's a job for Ubuntu or Debian.
I uninstalled all samba programs and reinstalled them (not including gadmin) to try and get the defaults back.
Love it or hate it samba is what samba is. You cannot break it unless you modify the source code. You or things like gadmin-samba can make it inoperable but only through smb.conf and smb.conf only contains changes to the default settings which no human has access to directly so restoring smb.conf to it's default state effectively resets yourself.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

newmintuser2020
Level 1
Level 1
Posts: 5
Joined: Sun Jul 05, 2020 11:26 am

Re: Samba issues - can't select guest access in gui and unsure how to password protect

Post by newmintuser2020 »

Well thank you for all your help.

One final thing, what is the path to the file that was outputted from the command

Code: Select all

net usershare info --long
so I can manually add/remove other users to different folders.

altair4
Level 20
Level 20
Posts: 10126
Joined: Tue Feb 03, 2009 10:27 am

Re: [SOLVED]Samba issues - can't select guest access in gui and unsure how to password protect

Post by altair4 »

One doesn't usually edit the share definitions for file manager created samba shares directly because the syntax is somewhat convoluted. It would be better to just go back to your file manager are "re-share" it with the correct options.

But to answer your question the share definitions are located here: /var/lib/samba/usershares
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

Post Reply

Return to “Newbie Questions”