Solved

Testing NIS Server & Client

Posted on 2001-07-17
6
495 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
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
installing docker on ubuntu 6 36
Ubuntu Apache Webserver - File Permissions 5 60
linux SFTP 8 63
Apache module 5 48
How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
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…
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…

821 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