SuSE NIS: Difference between revisions

From Lolly's Wiki
Jump to navigationJump to search
No edit summary
m (Text replacement - "<source" to "<syntaxhighlight")
Line 5: Line 5:
==NIS Client==
==NIS Client==
===Add packages===
===Add packages===
<source>
<syntaxhighlight>
# zypper in yast2-nis-client ypbind
# zypper in yast2-nis-client ypbind
</source>
</source>


===/etc/sysconfig/network/config===
===/etc/sysconfig/network/config===
<source>
<syntaxhighlight>
NETCONFIG_MODULES_ORDER="dns-resolver dns-bind dns-dnsmasq nis ntp-runtime"
NETCONFIG_MODULES_ORDER="dns-resolver dns-bind dns-dnsmasq nis ntp-runtime"
NETCONFIG_NIS_STATIC_SERVERS="nis-server.domain.tld"
NETCONFIG_NIS_STATIC_SERVERS="nis-server.domain.tld"
Line 17: Line 17:
</source>
</source>


<source>
<syntaxhighlight>
# netconfig update -f
# netconfig update -f
</source>
</source>


Check:  
Check:  
<source>
<syntaxhighlight>
# cat /etc/yp.conf
# cat /etc/yp.conf
...
...
Line 29: Line 29:


===Set NIS Domain===
===Set NIS Domain===
<source>
<syntaxhighlight>
# nisdomainname nis.domain.tld
# nisdomainname nis.domain.tld
</source>
</source>


Check:
Check:
<source>
<syntaxhighlight>
# nisdomainname
# nisdomainname
nis.domain.tld
nis.domain.tld
Line 41: Line 41:


===Add to /etc/passwd===
===Add to /etc/passwd===
<source>
<syntaxhighlight>
+::::::
+::::::
</source>
</source>
Line 47: Line 47:


===Add to /etc/shadow===
===Add to /etc/shadow===
<source>
<syntaxhighlight>
+::0:0:0::::
+::0:0:0::::
</source>
</source>


===/etc/nsswitch.conf===
===/etc/nsswitch.conf===
<source>
<syntaxhighlight>
...
...
passwd: compat
passwd: compat
Line 59: Line 59:
</source>
</source>
alternative for older installations:
alternative for older installations:
<source>
<syntaxhighlight>
...
...
passwd: files nis
passwd: files nis
Line 67: Line 67:


===yast===
===yast===
<source>
<syntaxhighlight>
Network Services -> NIS Client  
Network Services -> NIS Client  
[Alt]+[u]  (Use NIS)
[Alt]+[u]  (Use NIS)
Line 75: Line 75:


Check:
Check:
<source>
<syntaxhighlight>
# ypcat passwd.byname
# ypcat passwd.byname
</source>
</source>

Revision as of 17:03, 25 November 2021

!!!! First of all: You do NOT want NIS because of security reasons !!!!

NIS is not NIS+ and it is without encryption. So do not use it or if you really have to, use it wisely!

NIS Client

Add packages

<syntaxhighlight>

  1. zypper in yast2-nis-client ypbind

</source>

/etc/sysconfig/network/config

<syntaxhighlight> NETCONFIG_MODULES_ORDER="dns-resolver dns-bind dns-dnsmasq nis ntp-runtime" NETCONFIG_NIS_STATIC_SERVERS="nis-server.domain.tld" NETCONFIG_NIS_SETDOMAINNAME="yes" NETCONFIG_NIS_POLICY="auto" </source>

<syntaxhighlight>

  1. netconfig update -f

</source>

Check: <syntaxhighlight>

  1. cat /etc/yp.conf

... ypserver nis-server.domain.tld </source>

Set NIS Domain

<syntaxhighlight>

  1. nisdomainname nis.domain.tld

</source>

Check: <syntaxhighlight>

  1. nisdomainname

nis.domain.tld

</source>

Add to /etc/passwd

<syntaxhighlight> +:::::: </source>


Add to /etc/shadow

<syntaxhighlight> +::0:0:0:::: </source>

/etc/nsswitch.conf

<syntaxhighlight> ... passwd: compat group: compat ... </source> alternative for older installations: <syntaxhighlight> ... passwd: files nis group: files nis ... </source>

yast

<syntaxhighlight> Network Services -> NIS Client [Alt]+[u] (Use NIS) [F10] Finish [F9] Quit </source>

Check: <syntaxhighlight>

  1. ypcat passwd.byname

</source>