Bug 36652 - nmbd doesn't start if /var/run is link to /run
Summary: nmbd doesn't start if /var/run is link to /run
Status: CLOSED FIXED
Alias: None
Product: Sisyphus
Classification: Development
Component: samba (show other bugs)
Version: unstable
Hardware: all Linux
: P3 major
Assignee: Evgeny Sinelnikov
QA Contact: qa-sisyphus
URL: https://bugs.archlinux.org/task/62262
Keywords: relnote
Depends on:
Blocks:
 
Reported: 2019-04-21 12:03 MSK by Konstantin A Lepikhov (L.A. Kostis)
Modified: 2021-05-05 23:40 MSK (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Konstantin A Lepikhov (L.A. Kostis) 2019-04-21 12:03:20 MSK
# rpm -qf /etc/init.d/nmb 
samba-4.10.2-alt1.x86_64

# /etc/init.d/nmb start
Starting Samba NetBIOS Name Server service: [ DONE ]

# tail -f /var/log/messages 
....
2019-04-21T11:02:02.555745+02:00 lks nmbd[32375]:   started asyncdns process 32377
2019-04-21T11:02:02.555854+02:00 lks nmbd[32375]: [2019/04/21 11:02:02.555819,  0] ../../lib/util/become_daemon.c:122(exit_daemon)
2019-04-21T11:02:02.555891+02:00 lks nmbd[32375]:   exit_daemon: daemon failed to start: Failed to create directory for pid files, check 'pid directory', error code 17
2019-04-21T11:02:02.559756+02:00 lks nmb: nmbd startup succeeded

# ll /var/run
lrwxrwxrwx 1 root root 4 Jan 21  2018 /var/run -> /run/

See https://bugs.archlinux.org/task/62262
Comment 1 Konstantin A Lepikhov (L.A. Kostis) 2021-02-11 22:57:13 MSK
ping
Comment 2 Evgeny Sinelnikov 2021-02-11 23:27:28 MSK
I don't know how to reproduce it.

clw0 ~ # service nmb status
inactive

clw0 ~ # ls /var/log/samba/
old

clw0 ~ # service nmb start

clw0 ~ # ls /var/log/samba/
log.nmbd  old

clw0 ~ # tail /var/log/samba/log.nmbd 
[2021/02/11 23:24:37.413691,  0] ../../source3/nmbd/nmbd.c:960(main)
  nmbd version 4.12.11 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2020
[2021/02/11 23:24:37.433781,  0] ../../lib/util/become_daemon.c:136(daemon_ready)
  daemon_ready: daemon 'nmbd' finished starting up and ready to serve connections

clw0 ~ # ps auxf | grep nmb
root       81794  0.0  0.0   4404   708 pts/1    S+   23:24   0:00                      \_ grep --color=auto nmb
root       81788  0.0  0.5  69352  5904 ?        S    23:24   0:00 /usr/sbin/nmbd --no-process-group

clw0 ~ # rpm -q samba
samba-4.12.11-alt1.x86_64

clw0 ~ # cat /etc/samba/smb.conf
[global]
        security = ads
        realm = DOMAIN.ALT
        workgroup = DOMAIN
        netbios name = CLW0
        template shell = /bin/bash
        kerberos method = system keytab
        wins support = no

        idmap config * : range = 10000-20000000
        idmap config * : backend = tdb
;       encrypt passwords = true
;       dns proxy = no
;       socket options = TCP_NODELAY
;       domain master = no
;       local master = no
;       preferred master = no
;       os level = 0
;       domain logons = no
;       load printers = no
;       show add printer wizard = no
;       printcap name = /dev/null
;       disable spoolss = yes
[homes]
        comment = Home Directories
        browseable = no
        writable = yes

[printers]
        comment = All Printers
        path = /var/spool/samba
        browseable = no
        guest ok = no
        writable = no
        printable = yes
Comment 3 Evgeny Sinelnikov 2021-02-11 23:28:39 MSK
Yes, I have same /var/run:

clw0 ~ # ll /var/run
lrwxrwxrwx 1 root root 6 дек 27  2019 /var/run -> ../run/
Comment 4 Evgeny Sinelnikov 2021-02-11 23:32:35 MSK
(Ответ для Evgeny Sinelnikov на комментарий #3)
> Yes, I have same /var/run:
> 
> clw0 ~ # ll /var/run
> lrwxrwxrwx 1 root root 6 дек 27  2019 /var/run -> ../run/

Sorry, try to set /var/run as relative link. It is default in my installation stack based on updated ALT Workstation 9.1.
Comment 5 Konstantin A Lepikhov (L.A. Kostis) 2021-02-11 23:41:54 MSK
(In reply to Evgeny Sinelnikov from comment #4)
> (Ответ для Evgeny Sinelnikov на комментарий #3)
> > Yes, I have same /var/run:
> > 
> > clw0 ~ # ll /var/run
> > lrwxrwxrwx 1 root root 6 дек 27  2019 /var/run -> ../run/
> 
> Sorry, try to set /var/run as relative link. It is default in my
> installation stack based on updated ALT Workstation 9.1.

Maybe provide a workaround for non-ALT Workstation 9.1 systems? I'm using system based on my own livecd based on Sisyphus :)
Comment 6 Repository Robot 2021-05-05 23:40:24 MSK
samba-4.14.4-alt1 -> sisyphus:

 Fri Apr 30 2021 Evgeny Sinelnikov <sin@altlinux> 4.14.4-alt1
 - Fix buffer overrun in sids_to_unixids() (Fixes: CVE-2021-20254)
 - Final migration to /run directory (Closes: 35891, 36652, 39992)
 - Avoid build problems on e2k