What condition would cause smbd to call quotactl every minute? It also does a stat64 on each mount point in the mtab file.
On Mon, 9 Jul 2018 10:58:34 -0400 rac8006 via samba <samba at lists.samba.org> wrote:> > > What condition would cause smbd to call quotactl every minute? It > also does a stat64 on each mount point in the mtab file. > >Replying here because where you last posted wasn't the right place to post. [quote] I posted a question about samba 4.3.11. I posted the strace of smbd. Yes it was on a WD device. But I quess I didn't say that it was a strace of smbd. I also posted this question. What condition would cause smbd to call quotactl every minute? It also does a stat64 on each mount point in the mtab file. again I didn't say that it was smbd process. I've found a few cases where different versions of samba seem to access the disk every minute. Doing things that make no sense. My network other than having a folder mapped to a windows 10 PC nothing is being accessed for hours on end. Yet when you strace smbd it will show the trace data below. I will say that when smbd is started with the -D option it starts 3 processes. During this time smbd is not accessing the disk. But at some point in time a fourth smbd -D process starts up and that process is the one I did the strace on. [/quote] If another smbd process starts, it is because 'something' has contacted your server. Is this on your western digital my cloud device ? We need to see the smb.conf Rowland
On Tue, 10 Jul 2018 18:41:09 -0400 rac8006 at aol.com wrote:> > Here is the smb.conf file. The process that I straced is smbd -D > running on the WD MyCloud. It is running debian with busybox. > > Is there a way to determine who or what contacted the My cloud? I > usually have three My Cloud devices on the network. One running > debian linux with samba 4.0.0rc5 the other two clouds run 4.3.11 on a > busybox system. I also have a laptop running windows 10 pro > connected most of the time. I also have a dlink dns-323 running > 3.0.24. I also have two windows 10 Pro systems that are used to > record local TV from 8:00PM to 11:00PM. These windows PC's have the > My Clouds Public folders mapped to a drive letter. > > > Not sure what other information is required. > > MarksBrothers:~# cat /etc/samba/smb.conf > [ global ] > netbios name = MarksBrothers > server string = WDMyCloud > veto files = /:2eDS_Store/.bin/Network Trash > Folder/.systemfile/lost+found/Nas_Prog/mirrored/uploaded/.wdmc/.AppleDouble/ > workgroup = RACGROUP security = user > passdb backend = smbpasswd > ldap ssl = no > local master = no > os level = 0 > preferred master = no > smb2 leases = yes > fruit:copyfile= yes > printing = bsd > printcap name = /dev/null > disable spoolss = yes > max protocol = SMB3 > max xmit = 131072 > max log size = 10 > log level = 0 > socket options = IPTOS_LOWDELAY TCP_NODELAY SO_RCVBUF=2097152 > SO_SNDBUF=2097152 delete veto files = yes > unix charset = UTF8 > encrypt passwords = yes > map to guest = bad user > null passwords = yes > guest account = nobody > dns proxy = no > use mmap = yes > use spnego = yes > disable netbios = no > strict allocate = yes > csc policy = disable > min receivefile size = 16k > allocation roundup size = 0 > create mask = 0777 > directory mask = 0777 > force create mode = 0777 > force directory mode = 0777 > use sendfile = yes > smb passwd file = /etc/samba/smbpasswd > disable spoolss = yes > nt acl support = yes > acl map full control = yes > load printers = no > unix extensions = no > follow symlinks = yes > wide links = yes > printable = no > include = /etc/samba/tm_config.conf > > [ Public ] > comment > path = /mnt/HD/HD_a2/Public > browseable = yes > public = yes > available = yes > oplocks = yes > map archive = no > guest ok = yes > writable = yes > # !!properties = "media_serving","remote_access" > > [ SmartWare ] > comment > path = /mnt/HD/HD_a2/SmartWare > browseable = yes > public = yes > available = yes > oplocks = yes > map archive = no > guest ok = yes > writable = yes > # !!properties = "remote_access" > > [ TimeMachineBackup ] > comment > path = /mnt/HD/HD_a2/TimeMachineBackup > browseable = yes > public = yes > available = yes > oplocks = yes > map archive = no > guest ok = yes > writable = yes > # !!properties = "remote_access" >There doesn't seem to be anything there that will give you your problem, there are lots and lots of default settings and you really should be using the default 'tdbsam' passdb backend. Do you have any Apple computers or phones ? When Samba starts it will start several processes and when something connects to a share, smbd will fork into another process to deal with this. It sounds like this is your problem, something is connecting to Samba on a regular basis and you need to find out where this connection is coming from. It could be that one of your Windows machines is infected. Rowland
On Wed, 11 Jul 2018 13:48:45 -0400 rac8006 at aol.com wrote:> > I do not have any apple devices on my network. I would like to > change the smb.conf defaults. But WD in there infinite wisdom > modified the way samba is started up on reboot. They don't use the > rc scripts. They wrote there own utilities to start samba. They use > programs called smbcom smbcmd smbcv etc. They provide on > documentation on these programs. After some testing I found that > smbcmd starts smbd processes. But it also overwrites the smb.conf > file with what is displayed below. Even trying to set the loglevel > > is difficult. > > Thanks for you help. > >Sorry, but this is what you get when you purchase something with a proprietary OS. From a quick internet search it appears you may be able to replace the entire OS. This would allow you to do whatever you like, it would also ensure that there are no backdoors in the OS, it seems this may be very possible with the installed OS. If it is overwriting the smb.conf, then it is very probably using a template somewhere, if you can find this, you may be able to alter this instead. It would nice to know which version of Samba it is using, if it is version 3 or later, then they should be supplying the source code (I couldn't find it, but didn't search hard), if it is an earlier version, then it really shouldn't be connected to the internet. Rowland
On 7/11/2018 8:31 PM, Rowland Penny via samba wrote:> On Wed, 11 Jul 2018 13:48:45 -0400 > rac8006 at aol.com wrote: > >> >> I do not have any apple devices on my network. I would like to >> change the smb.conf defaults. But WD in there infinite wisdom >> modified the way samba is started up on reboot. They don't use the >> rc scripts. They wrote there own utilities to start samba. They use >> programs called smbcom smbcmd smbcv etc. They provide on >> documentation on these programs. After some testing I found that >> smbcmd starts smbd processes. But it also overwrites the smb.conf >> file with what is displayed below. Even trying to set the loglevel >> >> is difficult. >> >> Thanks for you help. >> >> > > Sorry, but this is what you get when you purchase something with a > proprietary OS. > From a quick internet search it appears you may be able to replace the > entire OS. This would allow you to do whatever you like, it would > also ensure that there are no backdoors in the OS, it seems this may > be very possible with the installed OS. > > If it is overwriting the smb.conf, then it is very probably using a > template somewhere, if you can find this, you may be able to alter > this instead. > > It would nice to know which version of Samba it is using, if it is > version 3 or later, then they should be supplying the source code (I > couldn't find it, but didn't search hard), if it is an earlier version, > then it really shouldn't be connected to the internet. >I didn't follow the thread but you should consider: https://community.wd.com/t/clean-os-debian-openmediavault-and-other-firmwares/93714 It's almost not possible to use WD stuff outside of the GUI. If your device is supported spend your time using an alternative OS or live with the GUI! :) -- John Doe
On Wed, 11 Jul 2018 15:57:20 -0400 rac8006 at aol.com wrote:> > The template is in the program smbcmd. If you do a strings on smbcmd > you get the full smb.conf file minus the shares which is kept in > another hidden file. The only way to make changes would be to add > them in the hidden file. Not sure if you add statements to the > hidden file.If 'smbcmd' is a compiled (which it sounds like) program, the you cannot alter it, it also sounds like a stupid thing to do.>That they > > will get written to the new smb.conf file. What would samba do if it > saw two loglevel entries?Last one wins.> The source that WD releases as part of the GPL implies that it is > 4.3.11.Then ALL your support comes from WD, 4.3.x is EOL as far as Samba is concerned.> I've rebuilt that version. Just having problems getting it > to run. Seems that WD releases the GPL source code. But the source > code does not match the > > code released in the firmware.Can you prove this ? If you can, I 'think' WD can be forced to release the correct source code.> Using the smbd -b shows differentDifferent in what way ? 'smbd' just shows how Samba was built.> > I was trying to get the symbols so I could use gdb to see what is > causing the problem.I think you will find it is that WD has messed with the Samba code and this is outside the help you will find here. Rowland