Networking Forums

Networking Forums > Computer Networking > Linux Networking > ATTN: Andy, NIS cannot lookup username

Reply
Thread Tools Display Modes

ATTN: Andy, NIS cannot lookup username

 
 
BeeReKeN
Guest
Posts: n/a

 
      07-23-2003, 10:29 AM
I couldn't reply to your post so ...

I have had that kind of problem myself ...
After adding users on your os or beginning with yp, you have to perform a
make, this converts the linux users to yp users and creates the right files
....
YP is pretty tricky and the smalest detail can cause you yp to fail

I will write you a little walkthrough, you can see what's different with
your actions.
I have used mandrake config files locations as it is close to redhat.
I don't like redhat, I use gentoo 1.4 myself on all servers.

Be sure following services are running:
-portmapper
-ypserv
-nfs
-yppasswdd
-ypbind (client)
-yptools (client)
check services with >ps -aux | grep (yp/nfs/portmap)
>wheris ypserv


Edit following files on your
Server & Client:

#add all your clients and servers in your hosts file
/etc/hosts
xxx.xxx.xxx.xxx host.domain host
#test with ping to hostnames

#set your nisdomain
>nisdomainname nisdomainname

#to set automaticly after reboot
/etc/sysconfig/network
NISDOMAIN=nisdomainname

server:
#edit your /var/yp/Makefile (if needed) (for example: delete the mail option
if you are not running a mailserver)
#make initial files and users:
>/usr/lib/yp/ypinit -m

or rebuild users
>/var/yp/make


#export networkshare
/etc/exports
/home xxx.xxx.xxx.xxx/xxx.xxx.xxx.xxx(rw)

clients:
#add nisdomain to yp config file (case sensitive)
/etc/yp.conf
nisdomainname server ypserverhostaname

#add mountpoint to networkshare
/etc/fstab
ypserverhostname:/home /home nfs soft,rsize=8192,wsize=8192,nosuid 0 0
#you can adjust the parameters to your preferences

test server with ypcat or ypwich

reboot all your clients and server after doing the changes, they say you
don't have to but ... hmmmmm
when using Xwindows on your client, your users will show up on the login
screen...
you will have to change the permissions on your /home directory on your
server if you want to use yp and login to Xwindows, for console use you
don't have to

Look good at your bootup screen, if you get errors there, like nisdomain not
found, you got problems with your config files... as I think that is your
problem now too ... double and triple check all the files (specially the
details), I know it is crazy but afterwards it is all worth it .. I know
....

hope you get it working !

Gerrit


 
Reply With Quote
 
 
 
 
Andy
Guest
Posts: n/a

 
      07-24-2003, 12:52 AM
BeeReKeN wrote:

> I couldn't reply to your post so ...


Thats ok, i seem to only be able to reply to that post even if i didn't want to
:-)

> I have had that kind of problem myself ...
> After adding users on your os or beginning with yp, you have to perform a
> make, this converts the linux users to yp users and creates the right files


Right. I learned how to work with yp in college..but thats been 2 or 3 years.
But i've been issuing the /var/lib/yp/ypinit -m
command to build the databases. As I remember, tahts all i should have to do.

> YP is pretty tricky and the smalest detail can cause you yp to fail


So it would seem ;-)

> [snip]
> Be sure following services are running:
> -portmapper
> -ypserv
> -nfs
> -yppasswdd
> -ypbind (client)
> -yptools (client)
> check services with >ps -aux | grep (yp/nfs/portmap)
> >wheris ypserv


Server:
ypserv, yppasswdd, nfsd (times 9), portmap

Client:
ypbind
no yptools, but are you sure thats a service?

> Edit following files on your
> Server & Client:
>
> #add all your clients and servers in your hosts file
> /etc/hosts
> xxx.xxx.xxx.xxx host.domain host
> #test with ping to hostnames


Host names work. No need to edit files though, i'm running an internal DNS
server, which
client machines being able to add thier name to the domain.

> #set your nisdomain
> >nisdomainname nisdomainname

> #to set automaticly after reboot
> /etc/sysconfig/network
> NISDOMAIN=nisdomainname


Thanks for that tidbit. I'd been setting the domain witha ypdomainname tacked
on
at the bottom of /etc/rc.d/rc.sysinit...since i didn't know about that last
seeting.
On the client, it seems to be picking up the domain properly from /etc/yp.conf

> server:
> #edit your /var/yp/Makefile (if needed) (for example: delete the mail option
> if you are not running a mailserver)
> #make initial files and users:
> >/usr/lib/yp/ypinit -m

> or rebuild users
> >/var/yp/make


I'll double check the make file. Nothing is breaking when i do ypinit though,
and the maps for passwd.byuid and passwd.byname do exist.

> #export networkshare
> /etc/exports
> /home xxx.xxx.xxx.xxx/xxx.xxx.xxx.xxx(rw)


Nfs isn't a requirement for yp, but it does make manging the home
directory nice. I do have it running fine though, and i can
assess it even before i started getting yp working.

> clients:
> #add nisdomain to yp config file (case sensitive)
> /etc/yp.conf
> nisdomainname server ypserverhostaname


Yup, have that.

> #add mountpoint to networkshare
> /etc/fstab
> ypserverhostname:/home /home nfs soft,rsize=8192,wsize=8192,nosuid 0 0
> #you can adjust the parameters to your preferences


Have that as well.

> test server with ypcat or ypwich


Those return what i'd expect, expect ypcat passwd.byuid doesn't return one of my
users.
However, any user logging in via nis has no name, even if they do appear in that
file.

> reboot all your clients and server after doing the changes, they say you
> don't have to but ... hmmmmm
> when using Xwindows on your client, your users will show up on the login
> screen...
> you will have to change the permissions on your /home directory on your
> server if you want to use yp and login to Xwindows, for console use you
> don't have to
>
> Look good at your bootup screen, if you get errors there, like nisdomain not
> found, you got problems with your config files... as I think that is your
> problem now too ... double and triple check all the files (specially the
> details), I know it is crazy but afterwards it is all worth it .. I know


Nope, everything goes as expected. No errors binding to the client, and i can
login with a nis account, its just that they have no name, which is causing
other
programs to break.

> hope you get it working !


Thanks for your reply! I hope i do too...i like having one place to add
a user for my linux / windows machines.

Andy

 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Attn Kraftee - help please!! mike Broadband 17 12-07-2007 01:37 AM
Windows XP profiles and Server 2003 (username.000 instead of username.domain) Herm Windows Networking 2 02-10-2005 11:05 AM
NIS cannot lookup username Andy Linux Networking 2 07-24-2003 02:29 AM
NIS cannot lookup username Andy Linux Networking 0 07-23-2003 03:39 AM
NIS cannot lookup username Andy Linux Networking 0 07-19-2003 04:15 PM



1 2 3 4 5 6 7 8 9 10 11