From e4b8a57190572c28482380fc49fd6ff4dc9b108a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20H=C3=A4nsch?= Date: Mon, 23 Sep 2019 15:56:05 +0200 Subject: [PATCH] distinguished nis_server nis_domain and smb_server --- config.example | 6 +++++- modules/smb_nis.mk | 14 ++++++++++---- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/config.example b/config.example index 5aee804..faf4485 100644 --- a/config.example +++ b/config.example @@ -53,8 +53,12 @@ ## In nodm, use full screen chromium web browser as session # webui=http://localhost/ -## When using NIS modules the directory server should be given +## When using NIS modules the directory server and NIS domain should be given # nis_server=nismaster +# nis_domain=example.com + +## also when using SMB the main server must be given +# smb_server=smbmaster ## If the approxmodule is enabled, then one (and only one) apt-source ## can be choosen to install packages from diff --git a/modules/smb_nis.mk b/modules/smb_nis.mk index 320c97a..2771d82 100644 --- a/modules/smb_nis.mk +++ b/modules/smb_nis.mk @@ -3,10 +3,16 @@ PACKAGES += cifs-utils libpam-mount libpam-script lxdm nis nscd samba-common-bin ifndef nis_server nis_server := nismaster endif +ifndef nis_domain + nis_domain := ${nis_server} +endif +ifndef smb_server + smb_server := ${nis_server} +endif define DEBCONF += -nis nis/domain string .${nis_server} +nis nis/domain string ${nis_domain} endef export smb_nis_pamscript smb_nis_pammount @@ -17,7 +23,7 @@ define smb_nis_pamscript := # forced through bash, to hide euid from smbpasswd /bin/bash -c ' printf "%s\n" "$$PAM_OLDAUTHTOK" "$$PAM_AUTHTOK" "$$PAM_AUTHTOK" \ - | smbpasswd -sr ${nis_server} -U "$$PAM_USER" + | smbpasswd -sr ${smb_server} -U "$$PAM_USER" ' exit $? @@ -27,7 +33,7 @@ endef define smb_nis_pammount := - + @@ -60,4 +66,4 @@ ${CFGROOT}/etc/yp.conf: ${CFGROOT} .FORCE printf 'ypserver %s\n' "${nis_server}" >"$@" ${CFGROOT}/etc/defaultdomain: ${CFGROOT} .FORCE - printf '.%s\n' "${nis_server}" >"$@" + printf '.%s\n' "${nis_domain}" >"$@" -- 2.39.2