LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Adding NIS users (https://www.linuxquestions.org/questions/linux-networking-3/adding-nis-users-208505/)

clinton 07-22-2004 07:14 PM

Adding NIS users
 
Hi everyone,

I need some assistance adding a user to my NIS domain.

I configured NIS on the server as a master server and as a client. I also started ypserv, ypbind, and yppasswdd.

I made a copy of /etc/passwd, /etc/group and /etc/shadow and placed them in /var/yp/ypfiles/

I also removed the root user from the copied file because I am using different root passwords on all my clients and don't want them to be the same (ie. managed by NIS).

Everything seems to have started ok. But I am not sure how add a user! I did a typical "useradd", and that made an entry in /etc/passwd but not in /var/yp/ypfiles/passwd. I would expect then that when I execute "make -C /var/yp" to update the NIS maps the new user won't be present.

I think copying the appropriate lines from /etc/* to /var/yp/ypfiles/* would do the trick, but that doesn't sound like it's the best way to do it.

Can anyone help please?

Thanks.

clinton 07-23-2004 02:59 PM

I have done some extra thinking on my problem.

It looks like I am missing some configuration to specify /var/yp/ypfiles as the source for the files stored there.

The results of executing "make -C /var/yp" is the following:

---------------------------------------------------------------------------------------
make: Entering directory `/var/yp'
gmake[1]: Entering directory `/var/yp/mynisdomain'
Updating netid.byname...
gmake[1]: Leaving directory `/var/yp/mynisdomain'
make: Leaving directory `/var/yp'
---------------------------------------------------------------------------------------

What this says to me is that passwd, group, etc. are not being update. (BTW my actual nisdomain is not mynisdomain, i just used it in this post).

Executing "ypcat hosts" displays all the proper hostnames, but "ypcat passwd" displays nothing.

(Part of) My NIS Makefile looks like this:

---------------------------------------------------------------------------------------
YPPWDDIR = /var/yp/ypfiles
---------------------------------------------------------------------------------------

and in this directory I have passwd, group, shadow and gshadow. Permissions on these files are 644 (passwd and group) and 400 (shadow and gshadow)

It looks like I am missing some other configuration to specify /var/yp/ypfiles as the source for the files stored there.

Can anyone suggest what (if anything) I may be missing? I'm pretty stymied.

The systems distro is RH Enterprise AS 3

Thanks for any help you can provide.


All times are GMT -5. The time now is 08:06 PM.