Michael Tokarev
2024-May-02 10:44 UTC
[Samba] winbind: does it actually depend on nmbd? and network-online?
Hi! In packaging/systemd/winbind.service, there's this ordering: After=network.target nmb.service Does winbind really need nmbd running? Another interesting dependency here. nmb.service (in the same directory) has Wants=network-online.target After=network.target network-online.target Note nmbd needs network to be online. While winbind only needs network to be up. If winbind requires nmbd, who in turn requires network to be online, winbind will be started only with online network. If we drop winbind dependency on nmbd here, winbind will be started earlier, before network is online. Does winbind requires network to be online or just up? I *guess* in order for winbind to be useful, network should be online, or else it wont be able to resolve names. On the other hand, it keeps internal cache so once a user is looked up, winbind can return this user from the cache without network being up. FWIW, requiring network.target doesn't really give us much: if it needs just basic tcp/ip to be able to bind to all-zeros address, loopback iface is being configured much earlier than any other services. On the other hand, if it needs particular interfaces to be up, it should depend on these interfaces, - after network.target is available, there's no guarantee that all interfaces are configured. Thanks, /mjt -- GPG Key transition (from rsa2048 to rsa4096) since 2024-04-24. New key: rsa4096/61AD3D98ECDF2C8E 9D8B E14E 3F2A 9DD7 9199 28F1 61AD 3D98 ECDF 2C8E Old key: rsa2048/457CE0A0804465C5 6EE1 95D1 886E 8FFB 810D 4324 457C E0A0 8044 65C5 Transition statement: http://www.corpit.ru/mjt/gpg-transition-2024.txt
Rowland Penny
2024-May-02 11:17 UTC
[Samba] winbind: does it actually depend on nmbd? and network-online?
On Thu, 2 May 2024 13:44:47 +0300 Michael Tokarev via samba <samba at lists.samba.org> wrote:> Hi! > > In packaging/systemd/winbind.service, there's this ordering: > > After=network.target nmb.service > > Does winbind really need nmbd running?Well, no and yes ;-) No, if you are running Samba as an AD Unix domain member without SMBv1 (in which case, you do not need nmbd at all), but if you are still running an NT4-style domain, then you need nmbd to provide NetBIOS Browsing.> > Another interesting dependency here. nmb.service (in the same > directory) has > > Wants=network-online.target > After=network.target network-online.target > > Note nmbd needs network to be online. While winbind only needs > network to be up. If winbind requires nmbd, who in turn requires > network to be online, winbind will be started only with online > network. If we drop winbind dependency on nmbd here, winbind will > be started earlier, before network is online. > > Does winbind requires network to be online or just up?No idea about that, perhaps Jeremy will know. Rowland