Hi, I have 2 centos 5 machines (actually virtual machines running on vmware server on fedora 7 host). for the purposes of learnign linux better I set up an nis domain "domain1" on the first box and made sure to start the appropriate services as per my book. I then make the second box the nis client putting it on the same domain and checkng it on both with the domainname command. I then set up a user on the nis server calling it nisuser1. I shared the home directorys using nfs, here is the output of the exports file
/inst 192.168.1.20(rw,sync) *(rw,sync)
/home 192.168.1.20(rw,sync,nohide)
/etc/exports (END)
I put the stuff in using the graphical manager. the .20 is the second centos that is the nis client.
on the client (centos box 2) I put the following command in the fstab to mount the home directories from box one.
/dev/VolGroup00_main/LogVol00 / ext3 defaults
1 1
LABEL=/boot /boot ext3 defaults
1 2
devpts /dev/pts devpts gid=5,mode=620
0 0
tmpfs /dev/shm tmpfs defaults
0 0
/dev/VolGroup01_home/LogVol00 /home ext3 defaults
1 2
proc /proc proc defaults
0 0
/dev/md0 /raid5 ext3 defaults
1 2
sysfs /sys sysfs defaults
0 0
/dev/VolGroup00_main/LogVol01 swap swap defaults
0 0
centos-5:/home /mnt/home nfs hard,intr 0 0
as you can see the last line is the mount to the home directory on the nis server. the hard,init 0 0 I got from the book, don't really know what it means. but the mount command show this
/dev/mapper/VolGroup00_main-LogVol00 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/hda1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
/dev/mapper/VolGroup01_home-LogVol00 on /home type ext3 (rw)
/dev/md0 on /raid5 type ext3 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
centos-5:/home on /mnt/home type nfs (rw,hard,intr,addr=192.168.1.19)
[root@centos-5-net ~]#
so I know the mount worked. also the ypcat passed command shows this...
[root@centos-5-net ~]# ypcat passwd
centos-5-user1:$1$vFqBxV97$4SsEMbcgWO/ksc2Wj9lUc1:500:500:centos-5-user1:/home/centos-5-user1:/bin/bash
centos-5-user2:$1$KjFo1pFF$RI5b3dNeaN3lj4T1fUOE11:501:501::/home/centos-5-user2:/bin/bash
manualuser:$1$kJBT1Feq$8PFvXs7HJi185SVqxsLj40:502:502::/home/manualuser:/bin/bash
nisuser1:$1$CfBnXKiK$TOAvdJNPC1zPkL8.EDW21.:503:503::/home/nisuser1:/bin/bash
[root@centos-5-net ~]#
which indicates to me that the nis client has gotten the right info (/home/nisuser1) from the server. I should mention that I disabled the firewall and selinux on the server as I didn't want to have to deal with that stuff here.
so I expect to be able to log on from the nis host using the name nisuser1 and then see the homedirectory /mnt/home which is where I mounted the remote home directorys to...but I get this message...
su: warning: cannot change directory to /home/nisuser1: No such file or directory
-bash-3.1$
it is the same message I get from the graphical log on screen...so what am I doing wrong here? the output of the ypcat passwd I thought meant that I got the maps correctly from the nis server and this showed the home directory from the /etc/passwd file. hmmm also I updated the /etc/nsswitch to this......
# To use db, put the "db" in front of "files" for entries you want to be
# looked up first in the databases
#
# Example:
#passwd: db files nisplus nis
#shadow: db files nisplus nis
#group: db files nisplus nis
passwd: files nis
shadow: files nis
group: files nis
#hosts: db files nisplus nis dns
hosts: files dns nis
to hopefully make the nis client look for nis stuff after looking in the local files.
any help here would be greatly appreciated...btw dummy down your tech talk as I don't really know that the heck I am doing here