Hello, I notice if I simply comment out a share or remove entirely. I receive errors such as theses. Is there a proper protocol to follow when removing a share? process_usershare_file: stat of /var/lib/samba/usershares/myshare failed. No such file or directory ../source3/param/loadparm.c:4366(process_usershare_file) process_usershare_file: stat of /var/lib/samba/usershares/myshare failed. Permission denied Relevant information below Distributor ID: Debian Description: Debian GNU/Linux 7.9 (wheezy) Release: 7.9 Codename: wheezy Samba Version 4.1.17-Debian [global] workgroup = SAMBA security = ADS realm = SAMBA.LOCAL dedicated keytab file = /etc/krb5.keytab kerberos method = secrets and keytab server string = Samba 4 Client %h winbind enum users = yes winbind enum groups = yes winbind use default domain = yes winbind expand groups = 4 winbind nss info = rfc2307 winbind refresh tickets = Yes winbind offline logon = yes winbind normalize names = Yes idmap config * : backend = tdb idmap config * : range = 2000-9999 idmap config SAMBA : backend = ad idmap config SAMBA : range = 10000-999999 idmap config SAMBA:schema_mode = rfc2307 printcap name = cups cups options = raw usershare allow guests = no domain master = no local master = no preferred master = no os level = 20 map to guest = bad user username map = /etc/samba/smbmap vfs objects = acl_xattr map acl inherit = Yes store dos attributes = Yes server max protocol = SMB3 client max protocol = SMB3 # Home Shares [home] comment = my share description path = /srv/samba/myshare read only = no -- -James
Am 05.10.2015 um 21:34 schrieb James:> Hello, > > I notice if I simply comment out a share or remove entirely. I > receive errors such as theses. Is there a proper protocol to follow when > removing a share? > > process_usershare_file: stat of /var/lib/samba/usershares/myshare > failed. No such file or directory > > ../source3/param/loadparm.c:4366(process_usershare_file) > > process_usershare_file: stat of /var/lib/samba/usershares/myshare > failed. Permission deniedwhat else do you expect after remove a share? frankly you can select a random error message (you can't but it don't matter) but you get a error when someone directly enters the url to a no longer existing share simple facts: * did the user get access * the answer is no * so where is your problem? -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 181 bytes Desc: OpenPGP digital signature URL: <http://lists.samba.org/pipermail/samba/attachments/20151005/5d1030a9/signature.sig>
Hello James, Am 05.10.2015 um 21:34 schrieb James:> I notice if I simply comment out a share or remove entirely. I > receive errors such as theses. Is there a proper protocol to follow when > removing a share? > > process_usershare_file: stat of /var/lib/samba/usershares/myshare > failed. No such file or directory > > ../source3/param/loadparm.c:4366(process_usershare_file) > > process_usershare_file: stat of /var/lib/samba/usershares/myshare > failed. Permission deniedDid you restart Samba after the change or run # smbcontrol all reload-config? Regards, Marc
On 05/10/15 20:34, James wrote:> Hello, > > I notice if I simply comment out a share or remove entirely. I > receive errors such as theses. Is there a proper protocol to follow when > removing a share? > > process_usershare_file: stat of /var/lib/samba/usershares/myshare > failed. No such file or directory > > ../source3/param/loadparm.c:4366(process_usershare_file) > > process_usershare_file: stat of /var/lib/samba/usershares/myshare > failed. Permission denied > > Relevant information below > > Distributor ID: Debian > Description: Debian GNU/Linux 7.9 (wheezy) > Release: 7.9 > Codename: wheezy > > Samba Version 4.1.17-Debian > > [global] > workgroup = SAMBA > security = ADS > realm = SAMBA.LOCAL > dedicated keytab file = /etc/krb5.keytab > kerberos method = secrets and keytab > server string = Samba 4 Client %h > winbind enum users = yes > winbind enum groups = yes > winbind use default domain = yes > winbind expand groups = 4 > winbind nss info = rfc2307 > winbind refresh tickets = Yes > winbind offline logon = yes > winbind normalize names = Yes > idmap config * : backend = tdb > idmap config * : range = 2000-9999 > idmap config SAMBA : backend = ad > idmap config SAMBA : range = 10000-999999 > idmap config SAMBA:schema_mode = rfc2307 > printcap name = cups > cups options = raw > usershare allow guests = no > domain master = no > local master = no > preferred master = no > os level = 20 > map to guest = bad user > username map = /etc/samba/smbmap > vfs objects = acl_xattr > map acl inherit = Yes > store dos attributes = Yes > server max protocol = SMB3 > client max protocol = SMB3 > > # Home Shares > [home] > comment = my share description > path = /srv/samba/myshare > read only = no >Fairly obvious really, either reload or restart Samba after removing the share. Rowland
On 10/5/2015 3:41 PM, Marc Muehlfeld wrote:> Hello James, > > Am 05.10.2015 um 21:34 schrieb James: >> I notice if I simply comment out a share or remove entirely. I >> receive errors such as theses. Is there a proper protocol to follow when >> removing a share? >> >> process_usershare_file: stat of /var/lib/samba/usershares/myshare >> failed. No such file or directory >> >> ../source3/param/loadparm.c:4366(process_usershare_file) >> >> process_usershare_file: stat of /var/lib/samba/usershares/myshare >> failed. Permission denied > > Did you restart Samba after the change or run > # smbcontrol all reload-config? > > > Regards, > MarcForgot to reply list when replying to Marc, I've restarted and ran smbcontrol all reload-config. -- -James
On 10/5/2015 3:41 PM, Rowland Penny wrote:> On 05/10/15 20:34, James wrote: >> Hello, >> >> I notice if I simply comment out a share or remove entirely. I >> receive errors such as theses. Is there a proper protocol to follow when >> removing a share? >> >> process_usershare_file: stat of /var/lib/samba/usershares/myshare >> failed. No such file or directory >> >> ../source3/param/loadparm.c:4366(process_usershare_file) >> >> process_usershare_file: stat of /var/lib/samba/usershares/myshare >> failed. Permission denied >> >> Relevant information below >> >> Distributor ID: Debian >> Description: Debian GNU/Linux 7.9 (wheezy) >> Release: 7.9 >> Codename: wheezy >> >> Samba Version 4.1.17-Debian >> >> [global] >> workgroup = SAMBA >> security = ADS >> realm = SAMBA.LOCAL >> dedicated keytab file = /etc/krb5.keytab >> kerberos method = secrets and keytab >> server string = Samba 4 Client %h >> winbind enum users = yes >> winbind enum groups = yes >> winbind use default domain = yes >> winbind expand groups = 4 >> winbind nss info = rfc2307 >> winbind refresh tickets = Yes >> winbind offline logon = yes >> winbind normalize names = Yes >> idmap config * : backend = tdb >> idmap config * : range = 2000-9999 >> idmap config SAMBA : backend = ad >> idmap config SAMBA : range = 10000-999999 >> idmap config SAMBA:schema_mode = rfc2307 >> printcap name = cups >> cups options = raw >> usershare allow guests = no >> domain master = no >> local master = no >> preferred master = no >> os level = 20 >> map to guest = bad user >> username map = /etc/samba/smbmap >> vfs objects = acl_xattr >> map acl inherit = Yes >> store dos attributes = Yes >> server max protocol = SMB3 >> client max protocol = SMB3 >> >> # Home Shares >> [home] >> comment = my share description >> path = /srv/samba/myshare >> read only = no >> > > Fairly obvious really, either reload or restart Samba after removing > the share. > > Rowland >I just found the cause. The 'error' is caused when a client attempts to access a share that is no longer available. I just tried to browse to the share that doesn't exist and I immediately seen the error. -- -James
Fix is very simple, if you dont want to see any error in the logs like me. I like clean logs.. Just add the following to smb.conf usershare path = thats it. restart your samba. I did not set this on my DC, but on my member servers. But give it a try. Tell us if it works on you DC also. Greetz, Louis> -----Oorspronkelijk bericht----- > Van: samba [mailto:samba-bounces at lists.samba.org] Namens James > Verzonden: maandag 5 oktober 2015 21:58 > Aan: samba at lists.samba.org > Onderwerp: Re: [Samba] Removing share from smb.conf > > On 10/5/2015 3:41 PM, Rowland Penny wrote: > > On 05/10/15 20:34, James wrote: > >> Hello, > >> > >> I notice if I simply comment out a share or remove entirely. I > >> receive errors such as theses. Is there a proper protocol to follow > when > >> removing a share? > >> > >> process_usershare_file: stat of /var/lib/samba/usershares/myshare > >> failed. No such file or directory > >> > >> ../source3/param/loadparm.c:4366(process_usershare_file) > >> > >> process_usershare_file: stat of /var/lib/samba/usershares/myshare > >> failed. Permission denied > >> > >> Relevant information below > >> > >> Distributor ID: Debian > >> Description: Debian GNU/Linux 7.9 (wheezy) > >> Release: 7.9 > >> Codename: wheezy > >> > >> Samba Version 4.1.17-Debian > >> > >> [global] > >> workgroup = SAMBA > >> security = ADS > >> realm = SAMBA.LOCAL > >> dedicated keytab file = /etc/krb5.keytab > >> kerberos method = secrets and keytab > >> server string = Samba 4 Client %h > >> winbind enum users = yes > >> winbind enum groups = yes > >> winbind use default domain = yes > >> winbind expand groups = 4 > >> winbind nss info = rfc2307 > >> winbind refresh tickets = Yes > >> winbind offline logon = yes > >> winbind normalize names = Yes > >> idmap config * : backend = tdb > >> idmap config * : range = 2000-9999 > >> idmap config SAMBA : backend = ad > >> idmap config SAMBA : range = 10000-999999 > >> idmap config SAMBA:schema_mode = rfc2307 > >> printcap name = cups > >> cups options = raw > >> usershare allow guests = no > >> domain master = no > >> local master = no > >> preferred master = no > >> os level = 20 > >> map to guest = bad user > >> username map = /etc/samba/smbmap > >> vfs objects = acl_xattr > >> map acl inherit = Yes > >> store dos attributes = Yes > >> server max protocol = SMB3 > >> client max protocol = SMB3 > >> > >> # Home Shares > >> [home] > >> comment = my share description > >> path = /srv/samba/myshare > >> read only = no > >> > > > > Fairly obvious really, either reload or restart Samba after removing > > the share. > > > > Rowland > > > I just found the cause. The 'error' is caused when a client attempts to > access a share that is no longer available. I just tried to browse to > the share that doesn't exist and I immediately seen the error. > > > > -- > -James > > > -- > To unsubscribe from this list go to the following URL and read the > instructions: https://lists.samba.org/mailman/options/samba