Problems login into NIS Slave and Client

Jamel Brown viril29 at yahoo.com
Sat Apr 3 13:19:37 PST 2004


freebsd1.compulinux.org 4.9-RELEASE FreeBSD
4.9-RELEASE #0: Mon Oct 27 17:51:09 GMT 2003    
root at freebsd-stable.sentex.ca:/usr/obj/usr/src/sys/GENERIC
 i386

freebsd2.compulinux.org 4.9-RELEASE FreeBSD
4.9-RELEASE #0: Mon Oct 27 17:51:09 GMT 2003    
root at freebsd-stable.sentex.ca:/usr/obj/usr/src/sys/GENERIC
 i386

freebsd3.compulinux.org 4.9-RELEASE FreeBSD
4.9-RELEASE #0: Mon Oct 27 17:51:09 GMT 2003    
root at freebsd-stable.sentex.ca:/usr/obj/usr/src/sys/GENERIC
 i386

freebsd4.compulinux.org 4.9-RELEASE FreeBSD
4.9-RELEASE #0: Mon Oct 27 17:51:09 GMT 2003    
root at freebsd-stable.sentex.ca:/usr/obj/usr/src/sys/GENERIC
 i386     

I'm having several problems setting up NIS on my
system I have 4 computers that I am trying to setup
NIS on. The roles I would like my computers to play
are as follows Freebsd1 Server, Freebsd2 Slave,
Freebsd3 Client, and Freebsd4 Client. I have been
trying to set up NIS according to what the FreeBSD
handbook says several times but all with no luck. Ok
here's is another thing I’m new to FreeBSD so I don’t
know how to use vipw very well so I always use add
user instead please let me know if I am causing the
problem by not using these programs. Also if you
notice I have missed anything please let me know. Also
Please Type in the exact command needed to fix my
problem if at all possible as I have stated before I
am new to FreeBSD so please assume I might not know.


This is /etc/group on freebsd1
# $FreeBSD: src/etc/group,v 1.19.2.3 2002/06/30
17:57:17 des Exp $
#
wheel:*:0:root
daemon:*:1:daemon
kmem:*:2:root
sys:*:3:root
tty:*:4:root
operator:*:5:root
mail:*:6:
bin:*:7:
news:*:8:
man:*:9:
games:*:13:
staff:*:20:root
sshd:*:22:
smmsp:*:25:
mailnull:*:26:
guest:*:31:root
bind:*:53:
uucp:*:66:
xten:*:67:xten
dialer:*:68:
network:*:69:
www:*:80:
nogroup:*:65533:
nobody:*:65534:
+:*::

This is /etc/group on freebsd2
# $FreeBSD: src/etc/group,v 1.19.2.3 2002/06/30
17:57:17 des Exp $
#
wheel:*:0:root
daemon:*:1:daemon
kmem:*:2:root
sys:*:3:root
tty:*:4:root
operator:*:5:root
mail:*:6:
bin:*:7:
news:*:8:
man:*:9:
games:*:13:
staff:*:20:root
sshd:*:22:
smmsp:*:25:
mailnull:*:26:
guest:*:31:root
bind:*:53:
uucp:*:66:
xten:*:67:xten
dialer:*:68:
network:*:69:
www:*:80:
nogroup:*:65533:
nobody:*:65534:
+:*::

This is /etc/group on freebsd3
# $FreeBSD: src/etc/group,v 1.19.2.3 2002/06/30
17:57:17 des Exp $
#
wheel:*:0:root
daemon:*:1:daemon
kmem:*:2:root
sys:*:3:root
tty:*:4:root
operator:*:5:root
mail:*:6:
bin:*:7:
news:*:8:
man:*:9:
games:*:13:
staff:*:20:root
sshd:*:22:
smmsp:*:25:
mailnull:*:26:
guest:*:31:root
bind:*:53:
uucp:*:66:
xten:*:67:xten
dialer:*:68:
network:*:69:
www:*:80:
nogroup:*:65533:
nobody:*:65534:
pgsql:*:70:
+:*::

This is /etc/group on freebsd4
# $FreeBSD: src/etc/group,v 1.19.2.3 2002/06/30
17:57:17 des Exp $
#
wheel:*:0:root
daemon:*:1:daemon
kmem:*:2:root
sys:*:3:root
tty:*:4:root
operator:*:5:root
mail:*:6:
bin:*:7:
news:*:8:
man:*:9:
games:*:13:
staff:*:20:root
sshd:*:22:
smmsp:*:25:
mailnull:*:26:
guest:*:31:root
bind:*:53:
uucp:*:66:
xten:*:67:xten
dialer:*:68:
network:*:69:
www:*:80:
nogroup:*:65533:
nobody:*:65534:
+:*::

This is /etc/host.conf on all hosts

# First try the /etc/hosts file
hosts
# Now try the nameserver next.
bind
# If you have YP/NIS configured, uncomment the next
line
nis

this is how /etc/hosts is listed on all hosts

::1			localhost localhost.compulinux.org
127.0.0.1		localhost localhost.compulinux.org
192.168.123.1		freebsd1.compulinux.org 	freebsd1
192.168.123.2		freebsd2.compulinux.org 	freebsd2
192.168.123.3		freebsd3.compulinux.org 	freebsd3
192.168.123.4		freebsd4.compulinux.org 	freebsd4
192.168.123.5		freebsd5.compulinux.org 	freebsd5
192.168.123.6		winxpcorp1.compulinux.org	winxpcorp1
192.168.123.7		winxpcorp2.compulinux.org	winxpcorp2
192.168.123.8		hpnotebook.compulinux.org	hpnotebook
+::

this is /etc/master.passwd on freebsd1
# $FreeBSD: src/etc/master.passwd,v 1.25.2.6
2002/06/30 17:57:17 des Exp $
#
root:$1$JXm8MlGX$HehcsfGmwYiOg1C337o5x/:0:0::0:0:Charlie
&:/root:/bin/csh
toor:*:0:0::0:0:Bourne-again Superuser:/root:
daemon:*:1:1::0:0:Owner of many system
processes:/root:/sbin/nologin
operator:*:2:5::0:0:System &:/:/sbin/nologin
bin:*:3:7::0:0:Binaries Commands and
Source:/:/sbin/nologin
tty:*:4:65533::0:0:Tty Sandbox:/:/sbin/nologin
kmem:*:5:65533::0:0:KMem Sandbox:/:/sbin/nologin
games:*:7:13::0:0:Games
pseudo-user:/usr/games:/sbin/nologin
news:*:8:8::0:0:News Subsystem:/:/sbin/nologin
man:*:9:9::0:0:Mister Man
Pages:/usr/share/man:/sbin/nologin
sshd:*:22:22::0:0:Secure Shell
Daemon:/var/empty:/sbin/nologin
smmsp:*:25:25::0:0:Sendmail Submission
User:/var/spool/clientmqueue:/sbin/nologin
mailnull:*:26:26::0:0:Sendmail Default
User:/var/spool/mqueue:/sbin/nologin
bind:*:53:53::0:0:Bind Sandbox:/:/sbin/nologin
uucp:*:66:66::0:0:UUCP
pseudo-user:/var/spool/uucppublic:/usr/libexec/uucp/uucicoxten:*:67:67::0:0:X-10
daemon:/usr/local/xten:/sbin/nologin
pop:*:68:6::0:0:Post Office
Owner:/nonexistent:/sbin/nologin
www:*:80:80::0:0:World Wide Web
Owner:/nonexistent:/sbin/nologin
nobody:*:65534:65534::0:0:Unprivileged
user:/nonexistent:/sbin/nologin
+:::::::::
nutso:Vs64AQDiM0J66:1000:1000::0:0:nutso:/usr/home/nutso:/usr/local/bin/bash


this is /etc/master.passwd on freebsd2
# $FreeBSD: src/etc/master.passwd,v 1.25.2.6
2002/06/30 17:57:17 des Exp $
#
root:$1$E7wJuHNq$xHWAGW8IZzjQYMDI8P/s./:0:0::0:0:Charlie
&:/root:/bin/csh
toor:*:0:0::0:0:Bourne-again Superuser:/root:
daemon:*:1:1::0:0:Owner of many system
processes:/root:/sbin/nologin
operator:*:2:5::0:0:System &:/:/sbin/nologin
bin:*:3:7::0:0:Binaries Commands and
Source:/:/sbin/nologin
tty:*:4:65533::0:0:Tty Sandbox:/:/sbin/nologin
kmem:*:5:65533::0:0:KMem Sandbox:/:/sbin/nologin
games:*:7:13::0:0:Games
pseudo-user:/usr/games:/sbin/nologin
news:*:8:8::0:0:News Subsystem:/:/sbin/nologin
man:*:9:9::0:0:Mister Man
Pages:/usr/share/man:/sbin/nologin
sshd:*:22:22::0:0:Secure Shell
Daemon:/var/empty:/sbin/nologin
smmsp:*:25:25::0:0:Sendmail Submission
User:/var/spool/clientmqueue:/sbin/nologin
mailnull:*:26:26::0:0:Sendmail Default
User:/var/spool/mqueue:/sbin/nologin
bind:*:53:53::0:0:Bind Sandbox:/:/sbin/nologin
uucp:*:66:66::0:0:UUCP
pseudo-user:/var/spool/uucppublic:/usr/libexec/uucp/uucico
xten:*:67:67::0:0:X-10
daemon:/usr/local/xten:/sbin/nologin
pop:*:68:6::0:0:Post Office
Owner:/nonexistent:/sbin/nologin
www:*:80:80::0:0:World Wide Web
Owner:/nonexistent:/sbin/nologin
nobody:*:65534:65534::0:0:Unprivileged
user:/nonexistent:/sbin/nologin
+:::::::::

this is /etc/master.passwd on freebsd3
# $FreeBSD: src/etc/master.passwd,v 1.25.2.6
2002/06/30 17:57:17 des Exp $
#
root:$1$2UT.Lahk$e/65yBpYQbZZs1AekwQAc0:0:0::0:0:Charlie
&:/root:/bin/csh
toor:*:0:0::0:0:Bourne-again Superuser:/root:
daemon:*:1:1::0:0:Owner of many system
processes:/root:/sbin/nologin
operator:*:2:5::0:0:System &:/:/sbin/nologin
bin:*:3:7::0:0:Binaries Commands and
Source:/:/sbin/nologin
tty:*:4:65533::0:0:Tty Sandbox:/:/sbin/nologin
kmem:*:5:65533::0:0:KMem Sandbox:/:/sbin/nologin
games:*:7:13::0:0:Games
pseudo-user:/usr/games:/sbin/nologin
news:*:8:8::0:0:News Subsystem:/:/sbin/nologin
man:*:9:9::0:0:Mister Man
Pages:/usr/share/man:/sbin/nologin
sshd:*:22:22::0:0:Secure Shell
Daemon:/var/empty:/sbin/nologin
smmsp:*:25:25::0:0:Sendmail Submission
User:/var/spool/clientmqueue:/sbin/nologin
mailnull:*:26:26::0:0:Sendmail Default
User:/var/spool/mqueue:/sbin/nologin
bind:*:53:53::0:0:Bind Sandbox:/:/sbin/nologin
uucp:*:66:66::0:0:UUCP
pseudo-user:/var/spool/uucppublic:/usr/libexec/uucp/uucico
xten:*:67:67::0:0:X-10
daemon:/usr/local/xten:/sbin/nologin
pop:*:68:6::0:0:Post Office
Owner:/nonexistent:/sbin/nologin
www:*:80:80::0:0:World Wide Web
Owner:/nonexistent:/sbin/nologin
nobody:*:65534:65534::0:0:Unprivileged
user:/nonexistent:/sbin/nologin
pgsql:*:70:70::0:0:PostgreSQL
Daemon:/usr/local/pgsql:/bin/sh
+:::::::::

this is /etc/master.passwd on freebsd4
# $FreeBSD: src/etc/master.passwd,v 1.25.2.6
2002/06/30 17:57:17 des Exp $
#
root:$1$n/9d57g2$H1Y9u38QJHubeNQacF8441:0:0::0:0:Charlie
&:/root:/bin/csh
toor:*:0:0::0:0:Bourne-again Superuser:/root:
daemon:*:1:1::0:0:Owner of many system
processes:/root:/sbin/nologin
operator:*:2:5::0:0:System &:/:/sbin/nologin
bin:*:3:7::0:0:Binaries Commands and
Source:/:/sbin/nologin
tty:*:4:65533::0:0:Tty Sandbox:/:/sbin/nologin
kmem:*:5:65533::0:0:KMem Sandbox:/:/sbin/nologin
games:*:7:13::0:0:Games
pseudo-user:/usr/games:/sbin/nologin
news:*:8:8::0:0:News Subsystem:/:/sbin/nologin
man:*:9:9::0:0:Mister Man
Pages:/usr/share/man:/sbin/nologin
sshd:*:22:22::0:0:Secure Shell
Daemon:/var/empty:/sbin/nologin
smmsp:*:25:25::0:0:Sendmail Submission
User:/var/spool/clientmqueue:/sbin/nologin
mailnull:*:26:26::0:0:Sendmail Default
User:/var/spool/mqueue:/sbin/nologin
bind:*:53:53::0:0:Bind Sandbox:/:/sbin/nologin
uucp:*:66:66::0:0:UUCP
pseudo-user:/var/spool/uucppublic:/usr/libexec/uucp/uucico
xten:*:67:67::0:0:X-10
daemon:/usr/local/xten:/sbin/nologin
pop:*:68:6::0:0:Post Office
Owner:/nonexistent:/sbin/nologin
www:*:80:80::0:0:World Wide Web
Owner:/nonexistent:/sbin/nologin
nobody:*:65534:65534::0:0:Unprivileged
user:/nonexistent:/sbin/nologin
ftp:*:14:5::0:0:Anonymous FTP
Admin:/var/ftp:/nonexistent
+:::::::::

this is /etc/rc.conf on freebsd1

defaultrouter="192.168.123.254"
hostname="freebsd1.compulinux.org"
ibcs2_enable="YES"
ifconfig_rl0="inet 192.168.123.1  netmask
255.255.255.0"
ipv6_enable="YES"
kern_securelevel_enable="NO"
linux_enable="YES"
moused_enable="YES"
moused_port="/dev/psm0"
moused_type="auto"
named_enable="YES"
nfs_client_enable="YES"
nfs_reserved_port_only="YES"
nisdomainname="compulinux.org"
nis_yppasswdd_enable="YES"
nis_client_flags="-S
compulinux.org,freebsd1.compulinux.org,freebsd2.compulinux.org"
nis_client_enable="YES"
nis_server_enable="YES"
portmap_enable="YES"
sendmail_enable="YES"
sshd_enable="YES"
svr4_enable="YES"
usbd_enable="YES"
ntpdate_flags="ntp.cox.smu.edu"
ntpdate_enable="YES"

this is /etc/rc.conf on freebsd2
defaultrouter="192.168.123.254"
hostname="freebsd2.compulinux.org"
ibcs2_enable="YES"
ifconfig_rl0="inet 192.168.123.2  netmask
255.255.255.0"
ipv6_enable="YES"
kern_securelevel_enable="NO"
linux_enable="YES"
moused_enable="YES"
moused_port="/dev/psm0"
moused_type="auto"
named_enable="YES"
nfs_client_enable="YES"
nfs_reserved_port_only="YES"
nis_client_enable="YES"
nis_server_enable="YES"
nisdomainname="compulinux.org"
nis_client_flags="-S
compulinux.org,freebsd1.compulinux.org,freebsd2.compulinux.org"
portmap_enable="YES"
sendmail_enable="YES"
sshd_enable="YES"
svr4_enable="YES"
usbd_enable="YES"
ntpdate_flags="ntp.cox.smu.edu"
ntpdate_enable="YES"

this is /etc/rc.conf on freebsd3
ifconfig_rl0="inet 192.168.123.3  netmask
255.255.255.0"
ipv6_enable="YES"
defaultrouter="192.168.123.254"
hostname="freebsd3.compulinux.org"
kern_securelevel_enable="NO"
moused_enable="YES"
moused_port="/dev/psm0"
moused_type="auto"
nfs_reserved_port_only="YES"
nfs_server_enable="YES"
mountd_flags="-r"
sendmail_enable="YES"
sshd_enable="YES"
usbd_enable="YES"
nis_client_enable="YES"
nisdomainname="compulinux.org"
portmap_enable="YES"
nis_client_flags="-S
compulinux.org,freebsd1.compulinux.org,freebsd2.compulinux.org"
svr4_enable="YES"
ibcs2_enable="YES"
linux_enable="YES"
ntpdate_flags="ntp.cox.smu.edu"
ntpdate_enable="YES"

this is /etc/rc.conf on freebsd4
defaultrouter="192.168.123.254"
hostname="freebsd4.compulinux.org"
ibcs2_enable="YES"
ifconfig_rl0="inet 192.168.123.4  netmask
255.255.255.0"
ipv6_enable="YES"
kern_securelevel_enable="NO"
linux_enable="YES"
moused_enable="YES"
moused_port="/dev/psm0"
moused_type="auto"
nfs_client_enable="YES"
nfs_reserved_port_only="YES"
nis_client_enable="YES"
nisdomainname="compulinux.org"
nis_client_flags="-S
compulinux.org,freebsd1.compulinux.org,freebsd2.compulinux.org"
portmap_enable="YES"
sendmail_enable="YES"
sshd_enable="YES"
svr4_enable="YES"
usbd_enable="YES"
ntpdate_flags="ntp.cox.smu.edu"
ntpdate_enable="YES"

The handbook then tells you to type a couple simple
things into the server
1. nisdomainname="compulinux.org"
2. nis_server_enable="YES"
3. nis_yppasswdd_enable="YES"
after doing that Instead of running /etc/netstart I
just reboot
then run the following commands
# cp /etc/master.passwd /var/yp/master.passwd
# cd /var/yp
# edit master.passwd
Removing all sytem account 
# chmod 600 master.passwd
freebsd1# ypinit -m compulinux.org
Server Type: MASTER Domain: compulinux.org

Creating an YP server will require that you answer a
few questions.
Questions will all be asked at the beginning of the
procedure.

Do you want this procedure to quit on non-fatal
errors? [y/n: n]  

Ok, please remember to go back and redo manually
whatever fails.
If you don't, something might not work. 

At this point, we have to construct a list of this
domains YP servers.
freebsd1.compulinux.org is already known as master
server.
Please continue to add any slave servers, one per
line. When you are
done with the list, type a <control D>.
        master server   :  freebsd1.compulinux.org
        next host to add:  freebsd2.compulinux.org
        next host to add:  ^D
The current list of NIS servers looks like this:

freebsd1.compulinux.org
freebsd2.compulinux.org

Is this correct?  [y/n: y]  y
Building /var/yp/compulinux.org/ypservers...
Running /var/yp/Makefile...
NIS Map update started on Sun Mar 21 06:04:03 CST 2004
for domain compulinux.org
Updating hosts.byname...
Creating new /var/yp/passwd file from
/var/yp/master.passwd...
Updating netid.byname...
Updating hosts.byaddr...
yp_mkdb: no key -- check source file for blank lines
Updating networks.byaddr...
yp_mkdb: no key -- check source file for blank lines
yp_mkdb: no key -- check source file for blank lines
Updating networks.byname...
yp_mkdb: no key -- check source file for blank lines
yp_mkdb: no key -- check source file for blank lines
Updating protocols.bynumber...
Updating protocols.byname...
Updating rpc.byname...
Updating rpc.bynumber...
Updating services.byname...
yp_mkdb: duplicate key 'compressnet/tcp' - skipping
yp_mkdb: duplicate key 'compressnet/udp' - skipping
yp_mkdb: duplicate key 'mit-ml-dev/tcp' - skipping
yp_mkdb: duplicate key 'mit-ml-dev/udp' - skipping
yp_mkdb: duplicate key 'rap/tcp' - skipping
yp_mkdb: duplicate key 'rap/udp' - skipping
yp_mkdb: duplicate key '351/tcp' - skipping
yp_mkdb: duplicate key '351/udp' - skipping
yp_mkdb: duplicate key '352/tcp' - skipping
yp_mkdb: duplicate key '352/udp' - skipping
yp_mkdb: duplicate key '666/tcp' - skipping
yp_mkdb: duplicate key '666/udp' - skipping
yp_mkdb: duplicate key '751/tcp' - skipping
yp_mkdb: duplicate key '751/udp' - skipping
yp_mkdb: duplicate key '754/tcp' - skipping
yp_mkdb: duplicate key '760/tcp' - skipping
yp_mkdb: duplicate key '761/tcp' - skipping
yp_mkdb: duplicate key '999/tcp' - skipping
yp_mkdb: duplicate key '999/udp' - skipping
yp_mkdb: duplicate key 'cadlock/tcp' - skipping
yp_mkdb: duplicate key 'csdmbase/tcp' - skipping
yp_mkdb: duplicate key 'csdmbase/udp' - skipping
yp_mkdb: duplicate key 'csdm/tcp' - skipping
yp_mkdb: duplicate key 'csdm/udp' - skipping
yp_mkdb: duplicate key '1525/tcp' - skipping
yp_mkdb: duplicate key '1525/udp' - skipping
yp_mkdb: duplicate key '1529/tcp' - skipping
yp_mkdb: duplicate key '1701/tcp' - skipping
yp_mkdb: duplicate key '1701/udp' - skipping
yp_mkdb: duplicate key '1989/tcp' - skipping
yp_mkdb: duplicate key '1989/udp' - skipping
yp_mkdb: duplicate key '1992/tcp' - skipping
yp_mkdb: duplicate key '1992/udp' - skipping
yp_mkdb: duplicate key '3455/udp' - skipping
yp_mkdb: duplicate key '4444/tcp' - skipping
yp_mkdb: duplicate key '4444/udp' - skipping
yp_mkdb: duplicate key '7010/tcp' - skipping
yp_mkdb: duplicate key '7010/udp' - skipping
yp_mkdb: duplicate key '22273/tcp' - skipping
yp_mkdb: duplicate key '22289/tcp' - skipping
yp_mkdb: duplicate key '22321/tcp' - skipping
yp_mkdb: duplicate key '22305/tcp' - skipping
Updating group.byname...
Updating group.bygid...
Updating passwd.byname...
Updating passwd.byuid...
Updating master.passwd.byname...
Updating master.passwd.byuid...
NIS Map update completed.

freebsd1.compulinux.org has been setup as an YP master
server without any errors

I then edit /var/vp/Makefile and make NOPUSH = TRUE to
#NOPUSH = TRUE
after that i normally reboot just to make sure all
changes have taken place. I then add users to the
system by typing

freebsd1# adduser nutso
Use option ``-silent'' if you don't want to see all
warnings and questions.

Check /etc/shells
Check /etc/master.passwd
Check /etc/group
Usernames must match regular expression: 
[^[a-z0-9_][a-z0-9_-]*$]: 
Enter your default shell: bash csh date no sh tcsh
[bash]: 
Your default shell is: bash -> /usr/local/bin/bash
Enter your default HOME partition: [/usr/home]: 
Copy dotfiles from: /usr/share/skel no
[/usr/share/skel]: 
Send message from file: /etc/adduser.message no 
[/etc/adduser.message]: 
Use passwords (y/n) [y]: 

Ok, let's go.
Don't worry about mistakes. I will give you the chance
later to correct any input.
Enter username [^[a-z0-9_][a-z0-9_-]*$]: nutso
Enter full name []: 
Enter shell bash csh date no sh tcsh [bash]: 
Enter home directory (full path) [/usr/home/nutso]: 
Uid [1000]: 
Enter login class: default []: 
Login group nutso [nutso]: 
Login group is ``nutso''. Invite nutso into other
groups: guest no 
[no]: 
Enter password []: 
Enter password again []: 

Name:     nutso
Password: ****
Fullname: nutso
Uid:      1000
Gid:      1000 (nutso)
Class:    
Groups:   nutso 
HOME:     /usr/home/nutso
Shell:    /usr/local/bin/bash
OK? (y/n) [y]: y
Added user ``nutso''
Send message to ``nutso'' and: no root
second_mail_address 
[no]: 

nutso,

your account ``nutso'' was created.
Have fun!

See also chpass(1), finger(1), passwd(1)

Add anything to default message (y/n) [n]: n
Send message (y/n) [y]: y
Copy files from /usr/share/skel to /usr/home/nutso
Add another user? (y/n) [y]: n
Goodbye!
Due to the system not coping these two user to
/var/yp/master.passwd i manually copy then into
/var/yp/master.passwd Please let me know how to fix
that. after editing the /var/yp/passwd file i will
type in.

#make
NIS Map update started on Sun Mar 21 06:35:31 CST 2004
for domain compulinux.org
Updating group.byname...
yppush: transfer of map group.byname to server
freebsd1.compulinux.org failed
yppush: status returned by ypxfr: Master's version not
newer
Pushed group.byname map.
Updating group.bygid...
yppush: transfer of map group.bygid to server
freebsd1.compulinux.org failed
yppush: status returned by ypxfr: Master's version not
newer
Pushed group.bygid map.
Creating new /var/yp/passwd file from
/var/yp/master.passwd...
Updating netid.byname...
yppush: transfer of map netid.byname to server
freebsd1.compulinux.org failed
yppush: status returned by ypxfr: Master's version not
newer
Pushed netid.byname map.
Updating passwd.byname...
yppush: transfer of map passwd.byname to server
freebsd1.compulinux.org failed
yppush: status returned by ypxfr: Master's version not
newer
Pushed passwd.byname map.
Updating passwd.byuid...
yppush: transfer of map passwd.byuid to server
freebsd1.compulinux.org failed
yppush: status returned by ypxfr: Master's version not
newer
Pushed passwd.byuid map.
Updating master.passwd.byname...
yppush: transfer of map master.passwd.byname to server
freebsd1.compulinux.org failed
yppush: status returned by ypxfr: Master's version not
newer
Pushed master.passwd.byname map.
Updating master.passwd.byuid...
yppush: transfer of map master.passwd.byuid to server
freebsd1.compulinux.org failed
yppush: status returned by ypxfr: Master's version not
newer
Pushed master.passwd.byuid map.
NIS Map update completed.

I then goto the Slave server I edit /etc/rc.conf place
the following in it.
1. nisdomainname="compulinux.org"
2. nis_server_enable="YES"
3. nis_yppasswdd_enable="YES"
I then type in
freebsd2# ypinit -s freebsd1 compulinux.org

Server Type: SLAVE Domain: compulinux.org Master:
freebsd1

Creating an YP server will require that you answer a
few questions.
Questions will all be asked at the beginning of the
procedure.

Do you want this procedure to quit on non-fatal
errors? [y/n: n]  

Ok, please remember to go back and redo manually
whatever fails.
If you don't, something might not work. 
There will be no further questions. The remainder of
the procedure
should take a few minutes, to copy the databases from
freebsd1.
Transfering master.passwd.byuid...
ypxfr: Exiting: Map successfully transferred
Transfering passwd.byuid...
ypxfr: Exiting: Map successfully transferred
Transfering passwd.byname...
ypxfr: Exiting: Map successfully transferred
Transfering group.bygid...
ypxfr: Exiting: Map successfully transferred
Transfering group.byname...
ypxfr: Exiting: Map successfully transferred
Transfering services.byname...
ypxfr: Exiting: Map successfully transferred
Transfering rpc.bynumber...
ypxfr: Exiting: Map successfully transferred
Transfering rpc.byname...
ypxfr: Exiting: Map successfully transferred
Transfering protocols.byname...
ypxfr: Exiting: Map successfully transferred
Transfering master.passwd.byname...
ypxfr: Exiting: Map successfully transferred
Transfering networks.byname...
ypxfr: Exiting: Map successfully transferred
Transfering protocols.bynumber...
ypxfr: Exiting: Map successfully transferred
Transfering hosts.byaddr...
ypxfr: Exiting: Map successfully transferred
Transfering netid.byname...
ypxfr: Exiting: Map successfully transferred
Transfering hosts.byname...
ypxfr: Exiting: Map successfully transferred
Transfering networks.byaddr...
ypxfr: Exiting: Map successfully transferred
Transfering ypservers...
ypxfr: Exiting: Map successfully transferred

freebsd2.compulinux.org has been setup as an YP slave
server without any errors. 
Don't forget to update map ypservers on freebsd1.
I then edit /etc/contab and put the following in it.
20      *   *    *    *    root   /usr/libexec/ypxfr
passwd.byname
21      *   *    *    *    root   /usr/libexec/ypxfr
passwd.byuid

Then I reboot that system then goto freebsd3

I edit /etc/rc.conf placing 
1. nisdomainname="compulinux.org"
2. nis_client_enable="YES"
I edit /etc/master.passwd placing +::::::::: at the
end of the file
I edit /etc/group placing +:*:: at the end of the file
I then reboot that then run the commands
Then I reboot that system then goto freebsd4

I edit /etc/rc.conf placing 
1. nisdomainname="compulinux.org"
2. nis_client_enable="YES"
I edit /etc/master.passwd placing +::::::::: at the
end of the file
I edit /etc/group placing +:*:: at the end of the file
I then reboot that then run the commands

I then go to a script on freebsd1 I made called
/root/jj which is 
/usr/libexec/ypxfr -f -d compulinux.org -h freebsd1 -h
freebsd2 -s compulinux.org master.passwd.byuid
/usr/libexec/ypxfr -f -d compulinux.org -h freebsd1 -h
freebsd2 -s compulinux.org passwd.byuid
/usr/libexec/ypxfr -f -d compulinux.org -h freebsd1 -h
freebsd2 -s compulinux.org passwd.byname
/usr/libexec/ypxfr -f -d compulinux.org -h freebsd1 -h
freebsd2 -s compulinux.org group.bygid
/usr/libexec/ypxfr -f -d compulinux.org -h freebsd1 -h
freebsd2 -s compulinux.org group.byname
/usr/libexec/ypxfr -f -d compulinux.org -h freebsd1 -h
freebsd2 -s compulinux.org services.byname
/usr/libexec/ypxfr -f -d compulinux.org -h freebsd1 -h
freebsd2 -s compulinux.org rpc.bynumber
/usr/libexec/ypxfr -f -d compulinux.org -h freebsd1 -h
freebsd2 -s compulinux.org rpc.byname
/usr/libexec/ypxfr -f -d compulinux.org -h freebsd1 -h
freebsd2 -s compulinux.org protocols.byname
/usr/libexec/ypxfr -f -d compulinux.org -h freebsd1 -h
freebsd2 -s compulinux.org master.passwd.byname
/usr/libexec/ypxfr -f -d compulinux.org -h freebsd1 -h
freebsd2 -s compulinux.org networks.byname
/usr/libexec/ypxfr -f -d compulinux.org -h freebsd1 -h
freebsd2 -s compulinux.org networks.byaddr
/usr/libexec/ypxfr -f -d compulinux.org -h freebsd1 -h
freebsd2 -s compulinux.org netid.byname
/usr/libexec/ypxfr -f -d compulinux.org -h freebsd1 -h
freebsd2 -s compulinux.org hosts.byaddr
/usr/libexec/ypxfr -f -d compulinux.org -h freebsd1 -h
freebsd2 -s compulinux.org protocols.bynumber
/usr/libexec/ypxfr -f -d compulinux.org -h freebsd1 -h
freebsd2 -s compulinux.org ypservers
/usr/libexec/ypxfr -f -d compulinux.org -h freebsd1 -h
freebsd2 -s compulinux.org hosts.byname

The system responds with 
freebsd1# /root/jj
ypxfr: Exiting: Map successfully transferred
ypxfr: Exiting: Map successfully transferred
ypxfr: Exiting: Map successfully transferred
ypxfr: Exiting: Map successfully transferred
ypxfr: Exiting: Map successfully transferred
ypxfr: Exiting: Map successfully transferred
ypxfr: Exiting: Map successfully transferred
ypxfr: Exiting: Map successfully transferred
ypxfr: Exiting: Map successfully transferred
ypxfr: Exiting: Map successfully transferred
ypxfr: Exiting: Map successfully transferred
ypxfr: Exiting: Map successfully transferred
ypxfr: Exiting: Map successfully transferred
ypxfr: Exiting: Map successfully transferred
ypxfr: Exiting: Map successfully transferred
ypxfr: Exiting: Map successfully transferred
ypxfr: Exiting: Map successfully transferred

then I run make
freebsd1# make
NIS Map update started on Wed Mar 31 22:56:03 CST 2004
for domain compulinux.org
NIS Map update completed

freebsd3# ypcat passwd
nutso:*:1000:1000:nutso:/usr/home/nutso:/usr/local/bin/bash
freebsd3# ypwhich
freebsd1.compulinux.org
freebsd3# passwd nutso
Changing NIS password for nutso on
freebsd1.compulinux.org.
Old Password: 
New password:
Retype new password:
NIS password has been changed on
freebsd1.compulinux.org.
freebsd3# su nutso
su: unknown login: nutso

For some odd reason I can't log into these account
that I have created. On the slave and clients
machines.
I Dont know what i did wrong can u please tell me.

Thank You


More information about the freebsd-questions mailing list