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.
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.
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 <amitkuma at redhat.com> wrote:> Try this configI can not see a relevant difference between your config and mine. Can you explain which part of it would do the job?> workgroup = WORKGROUPset> security = userset> map to guest = Bad Userset> passdb backend = tdbsamno need for it. set by default> read only = noset by "writeble = yes"> create mask = 0755not 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
Not only reading but understanding the manpages would help. ;) On 2017-03-21 13:47 "c.buhtz--- via samba" <samba at lists.samba.org> wrote:> This is the relevant line in the /etc/fstab > > //SPARKY/Public /mnt/Sparky/Public cifs rw,noauto,user 0 0See 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>
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-bounces at lists.samba.org] Namens c.buhtz--- via> samba> Verzonden: dinsdag 21 maart 2017 15:09> Aan: samba at lists.samba.org> Onderwerp: Re: [Samba] Public share ask for a password>> Not only reading but understanding the manpages would help. ;)>> On 2017-03-21 13:47 "c.buhtz--- via samba" <samba at 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>>> --> To unsubscribe from this list go to the following URL and read the> instructions: https://lists.samba.org/mailman/options/samba
On Tue, 21 Mar 2017 16:21:23 +0100 "L.P.H. van Belle via samba" <samba at 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
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:rpenny at samba.org] > Verzonden: dinsdag 21 maart 2017 16:45 > Aan: samba at 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" <samba at 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