Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Testing NIS Server & Client

Posted on 2001-07-17
6
Medium Priority
?
502 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
What Is Blockchain Technology?

Blockchain is a technology that underpins the success of Bitcoin and other digital currencies, but it has uses far beyond finance. Learn how blockchain works and why it is proving disruptive to other areas of IT.

 
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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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…
Suggested Courses

722 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