[Samba] winbindd not starting cleanly when Centos 7 boots
Brady, Mike
mike.brady at devnull.net.nz
Thu Sep 10 21:34:57 UTC 2015
On 2015-09-11 08:40, Jim Long wrote:
> I am a longtime BSD user but new to CentOS.
>
> I have winbindd configured to start automatically:
>
> # ls -l $(locate winbind | grep service)
> lrwxrwxrwx. 1 root root 39 Aug 20 12:29
> /etc/systemd/system/multi-user.target.wants/winbind.service ->
> /usr/lib/systemd/system/winbind.service
> -rw-r--r--. 1 root root 362 May 12 13:19
> /usr/lib/systemd/system/winbind.service
> # cat /usr/lib/systemd/system/winbind.service
> [Unit]
> Description=Samba Winbind Daemon
> After=syslog.target network.target nmb.service
>
> [Service]
> Environment=KRB5CCNAME=/run/samba/krb5cc_samba
> Type=notify
> NotifyAccess=all
> PIDFile=/run/winbindd.pid
> EnvironmentFile=-/etc/sysconfig/samba
> ExecStart=/usr/sbin/winbindd "$WINBINDOPTIONS"
> ExecReload=/usr/bin/kill -HUP $MAINPID
>
> [Install]
> WantedBy=multi-user.target
> #
>
> winbindd does start at boot time, but doesn't work:
>
> # reboot
> Connection to centos closed by remote host.
> Connection to centos closed.
> $ ping -o centos && ssh centos
> PING centos (10.160.171.246): 56 data bytes
> 64 bytes from 10.160.171.246: icmp_seq=44 ttl=64 time=0.350 ms
>
> --- centos ping statistics ---
> 45 packets transmitted, 1 packets received, 97.8% packet loss
> round-trip min/avg/max/stddev = 0.350/0.350/0.350/0.000 ms
> Last login: Thu Sep 10 12:33:01 2015 from 10.160.171.161
> # uptime
> 13:29:15 up 0 min, 2 users, load average: 1.58, 0.38, 0.13
> # findps winb
> root 1303 0.4 0.1 348400 5372 ? Ss 13:29 0:00
> /usr/sbin/winbindd
> root 1375 0.0 0.1 348304 3856 ? S 13:29 0:00
> /usr/sbin/winbindd
> # wbinfo -i longj22
> failed to call wbcGetpwnam: WBC_ERR_DOMAIN_NOT_FOUND
> Could not get info for user longj22
> # wbinfo -i longj22
> failed to call wbcGetpwnam: WBC_ERR_DOMAIN_NOT_FOUND
> Could not get info for user longj22
> # service winbind restart
> Restarting winbind (via systemctl): [ OK ]
> # wbinfo -i longj22
> longj22:*:324960:70513:Jim Long:/home/longj22:/bin/bash
> # findps winb
> root 2805 0.0 0.0 340988 3056 ? Ss 13:29 0:00
> /usr/sbin/winbindd
> root 2806 1.3 0.1 379268 7276 ? S 13:29 0:00
> /usr/sbin/winbindd
> root 2807 1.0 0.1 377172 6524 ? S 13:29 0:00
> /usr/sbin/winbindd
> # uptime
> 13:29:44 up 1 min, 2 users, load average: 1.04, 0.35, 0.12
>
> It's apparent that at boot time, two winbindd processes are running.
> After the service
> is restarted, there are three. Is this significant?
>
> More to the point, how can I adjust my service definition file to start
> the winbind service correctly at boot time?
>
> Thank you!
>
>
> Jim
Hi Jim
There should only be one, but there may be multiple threads. Use "ps
fauxwww". Partial output from one of my DCs.
root 1217 0.0 3.7 573208 37832 ? Ss Sep07 0:01
/usr/sbin/samba -D
root 1918 0.0 3.3 573208 33664 ? S Sep07 0:00 \_
/usr/sbin/samba -D
root 1921 0.0 3.8 612900 38868 ? Ss Sep07 0:20 | \_
/usr/sbin/smbd -D --option=server role check:inhibit=yes --foreground
root 1920 0.1 3.9 579892 39872 ? S Sep07 9:46 \_
/usr/sbin/samba -D
root 1924 0.0 3.5 577360 36068 ? S Sep07 0:05 \_
/usr/sbin/samba -D
root 1926 0.0 3.2 573208 33532 ? S Sep07 0:00 \_
/usr/sbin/samba -D
root 1927 0.0 3.8 575720 38684 ? S Sep07 0:18 \_
/usr/sbin/samba -D
root 1930 0.0 3.4 573208 34992 ? S Sep07 0:08 \_
/usr/sbin/samba -D
root 1934 0.0 3.7 579456 38064 ? S Sep07 0:07 \_
/usr/sbin/samba -D
root 1936 0.1 3.7 582016 38232 ? S Sep07 5:40 \_
/usr/sbin/samba -D
root 1937 0.0 3.3 573208 33652 ? S Sep07 0:00 \_
/usr/sbin/samba -D
root 1942 0.0 3.7 582788 38172 ? Ss Sep07 0:18 | \_
/usr/sbin/winbindd -D --option=server role check:inhibit=yes
--foreground
root 2007 0.0 3.6 598548 36672 ? S Sep07 0:34 |
\_ /usr/sbin/winbindd -D --option=server role check:inhibit=yes
--foreground
root 12871 0.0 3.5 599088 36516 ? S Sep07 0:00 |
\_ /usr/sbin/winbindd -D --option=server role check:inhibit=yes
--foreground
root 12872 0.0 3.4 582788 34696 ? S Sep07 0:00 |
\_ /usr/sbin/winbindd -D --option=server role check:inhibit=yes
--foreground
root 1940 0.0 3.4 573208 34744 ? S Sep07 0:00 \_
/usr/sbin/samba -D
root 1941 0.0 4.5 577360 46040 ? S Sep07 1:52 \_
/usr/sbin/samba -D
root 1943 0.0 3.4 573208 34772 ? S Sep07 0:19 \_
/usr/sbin/samba -D
Is this on a DC or member server? On a DC you do not need to start
winbindd. The samba process will do this for you.
Regards
Mike
More information about the samba
mailing list