Solved

Testing NIS Server & Client

Posted on 2001-07-17
6
500 Views
Last Modified: 2013-12-16
I have RH 7.1 as a server running NIS and Ypserver and
Slackware 8 as a client. I created an account
on NIS server machine using normal adduser command,
and tried the command, "ypcat passwd" to list all
of entries in /etc/passwd from NIS client machine.  
It looks everything works OK. Now, I tried to login
from my client machine, but the client machine doesn't
recognize the account I created on NIS server machine.

Do I need to copy /etc/passwd and /etc/shadow files
from NIS server machine to NIS client machine to
make NIS client work?  

cwp
0
Comment
Question by:cwpak
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 
LVL 5

Expert Comment

by:garboua
ID: 6292264
no, but you need to compile you database after you add a user on server.
0
 
LVL 5

Expert Comment

by:garboua
ID: 6292284
actually it is generate the db, compile etc etc
do a "whereis is ypinit" and then run it.  I have "/usr/lib/yp/ypinit" you can add this to your crontab to generate the database or modify script adduser to automatically regenerate the db when you create a user on server side.
0
 

Author Comment

by:cwpak
ID: 6295017

  I ran the command, "/usr/lib/yp/ypinit -m" on
  NIS server machine to generate the NIS(YP) database.
 
  I rebooted NIS server machine and NIS client machine
  just in case. After I rebooted both machine,
  I tried to login from NIS client machine using
  telnet, but still didn't recognize the account
  I created on NIS server machine.  I logged in
  to NIS client machine as a root and ran the command
  "ypcat passwd". It listed the account I created on
  NIS server machine correctly.  Is there any other
  doagnostic utility commands to verify that I setup
  NIS client correctly?  Is there any log files that
  are logged when someone tries to login and fails?


  Thanks,
0
Stressed Out?

Watch some penguins on the livecam!

 
LVL 5

Accepted Solution

by:
garboua earned 150 total points
ID: 6298420
did you setup the client correctly? meaning adding the +:::::: to end of /etc/passwd and all that jazz?
a. type "ypwhich" and see if you got your client.
b. type setup and go into the authentication option and make sure all your information are correct, domain, server, etc etc etc.
if you did then your problem is pam and not NIS.

1. take a look at your /etc/pam.d/login and see if you are using pam_pwdb_auth, if so you need to change it to unix, pam_unix_auth, although if you are using RH7.1 this should not be the case.
2. tell pam to allow the NIS users using the keylogin, add this line to /etc/pam.d/login
auth       required     /lib/security/pam_keylogin.so
and this sould let you ROCK and ROLL.

GOOD NIS-HOW-TO ->
http://www.linuxguru.com/docs/howto/NIS-HOWTO
ps.  in RH7.1  the "authentication option of "setup" " is very good and effective.  It took me two minutes to setup a new box on network. Try that.
0
 

Author Comment

by:cwpak
ID: 6299928

  Yes, that was it.  I needed to add
  "+::::::" at end of "/etc/passwd" on NIS
  client machine.  Do I still need to add
  "+::::::" at end of "/etc/group" on NIS
  client machine too?  

  I have one more question for you about
  auto-mount.
  Instead of mounting all of "/home/<users>"
  directory at boot time, I'd like to configure
  that when an user login is authenticated, the
  user's home directory is mounted from NFS server
  machine.  Could you let me know who to configure
  that?

  Thanks,

 
0
 
LVL 5

Expert Comment

by:garboua
ID: 6305512
use autofs instead, which allows you to specify all mount points.  the directories will not be mounted unless there is an access requeset.  for instance, if user "joeUser" is not signed on the box and you, root wants to access his, you can do "cd /home/joeUser" and booom.  all mount points are controlled using the auto.master  /etc/auto.master , in which you can specify, user name, which NFS his directory is located, default mount , etc etc etc.
for more details read the howto for autofs.
http://www.linux-consulting.com/Amd_AutoFS/autofs.html
good luck
0

Featured Post

 Database Backup and Recovery Best Practices

Join Percona’s, Architect, Manjot Singh as he presents Database Backup and Recovery Best Practices (with a Focus on MySQL) on Thursday, July 27, 2017 at 11:00 am PDT / 2:00 pm EDT (UTC-7). In the case of a failure, do you know how long it will take to restore your database?

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

627 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question