SuSE NIS: Difference between revisions

From Lolly's Wiki
Jump to navigationJump to search
m (Text replacement - "</source" to "</syntaxhighlight")
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Category:SuSE]]
=!!!! 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==
==NIS Client==
===Add packages===
===Add packages===
<source>
<syntaxhighlight>
# zypper in yast2-nis-client ypbind
# zypper in yast2-nis-client ypbind
</source>
</syntaxhighlight>


===/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"
NETCONFIG_NIS_SETDOMAINNAME="yes"
NETCONFIG_NIS_SETDOMAINNAME="yes"
NETCONFIG_NIS_POLICY="auto"
NETCONFIG_NIS_POLICY="auto"
</source>
</syntaxhighlight>


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


Check:  
Check:  
<source>
<syntaxhighlight>
# cat /etc/yp.conf
# cat /etc/yp.conf
...
...
ypserver nis-server.domain.tld
ypserver nis-server.domain.tld
</source>
</syntaxhighlight>


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


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


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




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


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


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


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

Latest revision as of 05:25, 26 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

# zypper in yast2-nis-client ypbind

/etc/sysconfig/network/config

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"
# netconfig update -f

Check:

# cat /etc/yp.conf
...
ypserver nis-server.domain.tld

Set NIS Domain

# nisdomainname nis.domain.tld

Check:

# nisdomainname
nis.domain.tld
#

Add to /etc/passwd

+::::::


Add to /etc/shadow

+::0:0:0::::

/etc/nsswitch.conf

...
passwd:	compat
group:	compat
...

alternative for older installations:

...
passwd:	files nis
group:	files nis
...

yast

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

Check:

# ypcat passwd.byname