Fedora 16
Sponsored Link

Configure NIS Client2011/11/11

  Configure on NIS clients in order to share users' accounts in your local networks.
[root@www ~]#
yum -y install ypbind rpcbind
[root@www ~]#
vi /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=www.srv.world
# add at the last line

NISDOMAIN=srv.world
[root@www ~]#
vi /etc/sysconfig/authconfig
USENIS=
yes
# line 20: change
[root@www ~]#
vi /etc/yp.conf
# add at the last line ( [domain] server [NIS server] )

domain srv.world server master.srv.world
[root@www ~]#
vi /etc/nsswitch.conf
passwd:
nis
files
# line 33: add

shadow:
nis
files
# add

group:
nis
files
# add

hosts:
nis
files dns myhostname
# add
# add optionally if you need ( create home directory automatically if it's none )

[root@www ~]#
vi /etc/pam.d/system-auth
# add at the last line

session     optional      pam_mkhomedir.so skel=/etc/skel umask=077

[root@www ~]#
systemctl enable rpcbind.service

[root@www ~]#
systemctl enable ypbind.service

[root@www ~]#
shutdown -r now
www login:
fedora
# a user on NIS

Password:
# password

Creating directory '/home/fedora'.
[fedora@www ~]$
# logined

[fedora@www ~]$
master
[fedora@www ~]$
ypcat passwd

ubuntu:x:1001:1001::/home/ubuntu:/bin/bash
saslauth:x:999:998:"Saslauthd user":/var/empty/saslauth:/sbin/nologin
fedora:x:1000:1000::/home/fedora:/bin/bash
debian:x:1002:1002::/home/debian:/bin/bash
[fedora@www ~]$
ypcat hosts

10.0.0.100 master master.srv.world
10.0.0.100 master master.srv.world
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
[fedora@www ~]$
# try to chnage NIS password

Changing NIS account information for fedora on master.
Please enter old password:
# current one

Changing NIS password for fedora on master.
Please enter new password:
# new one

Please retype new password:
The NIS password has been changed on master.
[fedora@www ~]$
# just changed

Matched Content