Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Testing NIS Server & Client

Posted on 2001-07-17
6
Medium Priority
?
505 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
  • 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 5

Accepted Solution

by:
garboua earned 600 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

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

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

Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

971 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