On 09/01/2018 07:03 PM, Luca Olivetti via samba wrote:> El 1/9/18 a les 03:03, Jamie Jackson via samba ha escrit: >> Hi folks, >> >> Every couple days any one of my project's 10 or so RHEL VMs can't be >> logged >> into with a domain account (active directory integration). Our admin goes >> in with a local account and restarts winbind to fix it. >> >> I'd like to be more proactive and, say, create a cron job to detect a >> problem and then restart winbind. >> >> Does anybody have a recipe for this? If not, do you have any >> suggestions as >> to how I can begin to figure out how to detect the problem? > > I run this cron job every minute. Winbind usually crashes once or twice > a day > > #!/bin/bash > getent group | grep -q 513 && exit 0 > echo "restarting winbind" > systemctl restart winbindIf the failure is a full daemon crash and not some kind of internal failure, you can edit the service unit file (systemd) and add a restart mode # systemctl edit winbind [Service] Restart=on-failure
El 3/9/18 a les 15:23, Robert Marcano via samba ha escrit:>> >> I run this cron job every minute. Winbind usually crashes once or >> twice a day >> >> #!/bin/bash >> getent group | grep -q 513 && exit 0 >> echo "restarting winbind" >> systemctl restart winbind > > If the failure is a full daemon crash and not some kind of internal > failure, you can edit the service unit file (systemd) and add a restart > mode > > # systemctl edit winbind > > [Service] > Restart=on-failure >In my case the daemon doesn't crash, it just stops resolving (some) groups. In any case the above check covers both cases. Bye -- Luca Olivetti Wetron Automation Technology http://www.wetron.es/ Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007
On Mon, 3 Sep 2018 15:37:03 +0200 Luca Olivetti via samba <samba at lists.samba.org> wrote:> El 3/9/18 a les 15:23, Robert Marcano via samba ha escrit: > > >> > >> I run this cron job every minute. Winbind usually crashes once or > >> twice a day > >> > >> #!/bin/bash > >> getent group | grep -q 513 && exit 0 > >> echo "restarting winbind" > >> systemctl restart winbind > > > > If the failure is a full daemon crash and not some kind of internal > > failure, you can edit the service unit file (systemd) and add a > > restart mode > > > > # systemctl edit winbind > > > > [Service] > > Restart=on-failure > > > > In my case the daemon doesn't crash, it just stops resolving (some) > groups. In any case the above check covers both cases. >The OP's winbind isn't crashing either, he is running it as a single instance. Why does your winbind stop resolving groups ? Is it always the same groups ? How are you running Samba ? Rowland