Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[Samba] Public share ask for a password

61 views
Skip to first unread message

c.buhtz--- via samba

unread,
Mar 21, 2017, 9:10:03 AM3/21/17
to
Hi,

I am using a Samba-server (2:4.2.14+dfsg-0+deb8u2) on Debian stable.
The Samba-client (samba-common ist 2:4.5.6+dfsg-1) runs on a Debian
unstable.

When I try to mount a Public share I am ask for a password. I don't
know why. There should be no need for a password. And I can log in no
matter if or which password I enter.

I can I prevent the password questions?

The is the IMO relevant part of my /etc/samba/smb.conf

[global]
map to guest = Bad User
usershare allow guests = no

[Public]
path = /Daten/Public
browsable = yes
guest ok = yes
writeable = yes

This is the relevant line in the /etc/fstab

//SPARKY/Public /mnt/Sparky/Public cifs rw,noauto,user 0 0

I am not sure on which side I did something wrong.

--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/options/samba

amit kumar via samba

unread,
Mar 21, 2017, 9:20:02 AM3/21/17
to
Hello,

Try this config

# vim /etc/samba/smb.conf
[global]
workgroup = WORKGROUP
security = user
map to guest = Bad User
passdb backend = tdbsam
[myshare]
path = /share
browsable = yes
guest ok = yes
read only = no
create mask = 0755

# service smb restart

Thanks
Amit Kumar

On 03/21/2017 06:17 PM, c.buhtz--- via samba wrote:
> I am using a Samba-server (2:4.2.14+dfsg-0+deb8u2) on Debian stable.
> The Samba-client (samba-common ist 2:4.5.6+dfsg-1) runs on a Debian
> unstable.
>
> When I try to mount a Public share I am ask for a password. I don't
> know why. There should be no need for a password. And I can log in no
> matter if or which password I enter.
>
> I can I prevent the password questions?
>
> The is the IMO relevant part of my /etc/samba/smb.conf
>
> [global]
> map to guest = Bad User
> usershare allow guests = no
>
> [Public]
> path = /Daten/Public
> browsable = yes
> guest ok = yes
> writeable = yes
>
> This is the relevant line in the /etc/fstab
>
> //SPARKY/Public /mnt/Sparky/Public cifs rw,noauto,user 0 0
>
> I am not sure on which side I did something wrong.

--
Thanks
Amit Kumar
There are three ways to get something done:
(1) Do it yourself.
(2) Hire someone to do it for you.
(3) Forbid your kids to do it.

c.buhtz--- via samba

unread,
Mar 21, 2017, 9:30:03 AM3/21/17
to
Dear Amit,

thanks for your fast reply. I am a bit surprised that you answer in
HTML and doing TOFU despite that you come from a readhat.com mailbox. ;)

On 2017-03-21 18:42 amit kumar <amit...@redhat.com> wrote:
> Try this config

I can not see a relevant difference between your config and mine. Can
you explain which part of it would do the job?

> workgroup = WORKGROUP
set

> security = user
set

> map to guest = Bad User
set

> passdb backend = tdbsam
no need for it. set by default

> read only = no
set by "writeble = yes"

> create mask = 0755
not set. default is 0744. But don't see that this would affect my
problem.

If this was your working config than I would suggest that there is
something wrong on my client site.

kind
Christian

amit kumar via samba

unread,
Mar 21, 2017, 10:00:04 AM3/21/17
to
Dear Christian,

Yes this is working config on samba server.

Hope mount line in /etc/fstab is not a problem.

# mkdir /share //Just for try create a local directory on server.
# setenforce 0 //Disable selinux
//Change smb.conf
# testparm
# iptables -F; iptables -F -t nat; iptables -F -t mangle
//Flush IP Tables
# /usr/sbin/smb -F -S //Running in foreground
<====Provide this o/p

//Try to access shares...

Thanks
Thanks
Amit Kumar
There are three ways to get something done:
(1) Do it yourself.
(2) Hire someone to do it for you.
(3) Forbid your kids to do it.

c.buhtz--- via samba

unread,
Mar 21, 2017, 10:20:04 AM3/21/17
to
Not only reading but understanding the manpages would help. ;)

On 2017-03-21 13:47 "c.buhtz--- via samba" <sa...@lists.samba.org>
wrote:
> This is the relevant line in the /etc/fstab
>
> //SPARKY/Public /mnt/Sparky/Public cifs rw,noauto,user 0 0

See the explanation of "password" in the manpage of "mount.cifs".
mount.cifs will always ask for a password (if it is not given implicit
with environment variable or credential file) also when guest users are
allowed on the samba share.

This means you have to add "password=" to the fstab line. Then it works
well.

I can not see a technical or design reason about this behaviour.
<http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=858343>

L.P.H. van Belle via samba

unread,
Mar 21, 2017, 11:30:04 AM3/21/17
to
Hai,

 

I suggest NOT to use fstab but systemd startups if you on debian jessie.

 

Get to know systemd and if you do i’ll bet you like it.

I know only on that hates it.. dont you Rowland. ;-)

 

Have look here for a good example for mount and automount.

http://michlstechblog.info/blog/systemd-mount-examples-for-cifs-shares/

and if you do need fstab, that example shows what your missing.

 

I used that link also for my NFSv4 Kerberos automounts as example.

And i can say works great.

 

Greetz,

 

Louis

 

 

 

> -----Oorspronkelijk bericht-----

> Van: samba [mailto:samba-...@lists.samba.org] Namens c.buhtz--- via

> samba

> Verzonden: dinsdag 21 maart 2017 15:09

> Aan: sa...@lists.samba.org

> Onderwerp: Re: [Samba] Public share ask for a password

Rowland Penny via samba

unread,
Mar 21, 2017, 11:50:03 AM3/21/17
to
On Tue, 21 Mar 2017 16:21:23 +0100
"L.P.H. van Belle via samba" <sa...@lists.samba.org> wrote:

> Hai,
>
>  
>
> I suggest NOT to use fstab but systemd startups if you on debian
> jessie.
>
>  
>
> Get to know systemd and if you do i’ll bet you like it.
>
> I know only on that hates it.. dont you Rowland. ;-)

I am not the only one Louis and this is one of the reasons why.
Just what has an init system got to do with mounting a filesystem ??

I am not adverse to progress, but, in my opinion, systemd isn't
progress, it is a way of making red-hat richer! Your opinion may
differ, just don't waste your time trying to change my opinion of
systemd.

Rowland

L.P.H. van Belle via samba

unread,
Mar 21, 2017, 12:30:04 PM3/21/17
to

Well, im never trying to change your optionion Rowland, i wont dare..

> Just what has an init system got to do with mounting a filesystem ??
Compaired to fstab, i get a better result with my nfs mounts.
Before, somethimes, with the fstab setup, when logging in on ssh on an automounted userhome dir, with NVSv4 kerberized. Did fail for now and then.
Now with the systemd, i didnt have any fails.

I dont know exact the difference, why, but i like it. :-) as simpel as that.
I can only think of the better boot order of services etc.
I compaired my fstab settings with the systemd setttings,
it was exact the same.

The why im suggesting not useing fstab on jessie ( and higer ) is that,
if we want it or not, systemd is coming and stretch has even more systemd.

But héé, its just an opionion, everybody should have one. :-)

Greetz,

Louis



> -----Oorspronkelijk bericht-----
> Van: Rowland Penny [mailto:rpe...@samba.org]
> Verzonden: dinsdag 21 maart 2017 16:45
> Aan: sa...@lists.samba.org
> CC: L.P.H. van Belle
> Onderwerp: Re: [Samba] Public share ask for a password
>
> On Tue, 21 Mar 2017 16:21:23 +0100
> "L.P.H. van Belle via samba" <sa...@lists.samba.org> wrote:
>
> > Hai,
> >
> >
> >
> > I suggest NOT to use fstab but systemd startups if you on debian
> > jessie.
> >
> >
> >
> > Get to know systemd and if you do i?ll bet you like it.

Rowland Penny via samba

unread,
Mar 21, 2017, 12:50:04 PM3/21/17
to
On Tue, 21 Mar 2017 17:18:30 +0100
"L.P.H. van Belle via samba" <sa...@lists.samba.org> wrote:

>
> Well, im never trying to change your optionion Rowland, i wont dare..
>
> > Just what has an init system got to do with mounting a filesystem ??
> Compaired to fstab, i get a better result with my nfs mounts.
> Before, somethimes, with the fstab setup, when logging in on ssh on
> an automounted userhome dir, with NVSv4 kerberized. Did fail for now
> and then. Now with the systemd, i didnt have any fails.

If you could just choose the bits of systemd and use them, then it
would be an improvement, but to get your 'fstab' improvement, you have
to have all of systemd and who knows just where it will end ? probably
with red-hat/systemd instead of GNU/Linux.

>
> I dont know exact the difference, why, but i like it. :-) as simpel
> as that. I can only think of the better boot order of services etc.
> I compaired my fstab settings with the systemd setttings,
> it was exact the same.

It works for you, so of course you like it.
>
> The why im suggesting not useing fstab on jessie ( and higer ) is
> that, if we want it or not, systemd is coming and stretch has even
> more systemd.

Hopefully Devuan will come to fruition, but if not, there is always
FreeBSD.

>
> But héé, its just an opionion, everybody should have one. :-)

And you, like I, are entitled to your own opinion, which I respect.
0 new messages