Solved

Testing NIS Server & Client

Posted on 2001-07-17
6
490 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
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

In this tutorial I will explain how to make squid prevent malwares in five easy steps: Squid is a caching proxy for the Web supporting HTTP, HTTPS, FTP, and more. It reduces bandwidth and improves response times by caching and reusing frequently-…
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
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.:

762 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now