[CentOS] Need to restart ypserv to update the nis maps

2008-08-11 Thread Theo Band

Hi

I use NIS om my network (CentOS4.6). When an update on a map occurs 
(home directory changed in /etc/passwd for instance), I run make -C 
/var/yp/ and check the result on a client. On the client I use ypcat 
passwd and find indeed that the update has propagated (the clients run 
ypbind service). On the client I have configured /etc/nsswitch.conf with :

passwd: files nis
shadow: files nis
group:  files nis

The problem is however that on the client, if I try to use the new data, 
it still uses the old one. For instance cd ~john still directs me to 
the old path instead of to the updated path (as correctly reported by 
ypcat passwd).
To solve it I need to restart the ypserv service on the nis server for 
every change.


Does anyone now what could be the problem or where I should look? 
Apparently the OS gets password and user info using another way than the 
ypcat tool.


(ypserv-2.13-18,ypbind-1.17.2-13)

Thanks,
Theo
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Need to restart ypserv to update the nis maps

2008-08-11 Thread Clint Dilks

Theo Band wrote:

Hi

I use NIS om my network (CentOS4.6). When an update on a map occurs 
(home directory changed in /etc/passwd for instance), I run make -C 
/var/yp/ and check the result on a client. On the client I use ypcat 
passwd and find indeed that the update has propagated (the clients 
run ypbind service). On the client I have configured 
/etc/nsswitch.conf with :

passwd: files nis
shadow: files nis
group:  files nis

The problem is however that on the client, if I try to use the new 
data, it still uses the old one. For instance cd ~john still directs 
me to the old path instead of to the updated path (as correctly 
reported by ypcat passwd).
To solve it I need to restart the ypserv service on the nis server for 
every change.


Does anyone now what could be the problem or where I should look? 
Apparently the OS gets password and user info using another way than 
the ypcat tool.


(ypserv-2.13-18,ypbind-1.17.2-13)

Thanks,
Theo
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Hi Theo,

As you are talking about the users homes I assume you are providing this 
via something like NFS?


If so it is your autofs information that controls what home gets mounted 
not the passwd information.


You can configure autofs to reference a NIS map.  Normally I would 
expect this to be something like auto_home.  An entry in this file might 
look like

user  server:nfs exported dir:

And you would have an entry in /etc/auto.master
/home  auto.home

I hope this helps :)
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Need to restart ypserv to update the nis maps

2008-08-11 Thread Clint Dilks

Clint Dilks wrote:

Theo Band wrote:

Hi

I use NIS om my network (CentOS4.6). When an update on a map occurs 
(home directory changed in /etc/passwd for instance), I run make -C 
/var/yp/ and check the result on a client. On the client I use ypcat 
passwd and find indeed that the update has propagated (the clients 
run ypbind service). On the client I have configured 
/etc/nsswitch.conf with :

passwd: files nis
shadow: files nis
group:  files nis

The problem is however that on the client, if I try to use the new 
data, it still uses the old one. For instance cd ~john still 
directs me to the old path instead of to the updated path (as 
correctly reported by ypcat passwd).
To solve it I need to restart the ypserv service on the nis server 
for every change.


Does anyone now what could be the problem or where I should look? 
Apparently the OS gets password and user info using another way than 
the ypcat tool.


(ypserv-2.13-18,ypbind-1.17.2-13)

Thanks,
Theo
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Hi Theo,

As you are talking about the users homes I assume you are providing 
this via something like NFS?


If so it is your autofs information that controls what home gets 
mounted not the passwd information.


You can configure autofs to reference a NIS map.  Normally I would 
expect this to be something like auto_home.  An entry in this file 
might look like

user  server:nfs exported dir:

And you would have an entry in /etc/auto.master
/home  auto.home

I hope this helps :)
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos

Just to clarify this post.  The password file is still referenced eg if 
you have a user bob on your system with a home dir set to /home/bob 
(from the passwd file)  autofs tells your system where to mount 
/home/bob from rather than looking on local disk.


___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Need to restart ypserv to update the nis maps

2008-08-11 Thread Mogens Kjaer

Theo Band wrote:
...
The problem is however that on the client, if I try to use the new data, 
it still uses the old one. 


If you run authconfig-gtk on the client and look at the Options tab,
is Cache user information selected?

Mogens

--
Mogens Kjaer, Carlsberg A/S, Computer Department
Gamle Carlsberg Vej 10, DK-2500 Valby, Denmark
Phone: +45 33 27 53 25, Fax: +45 33 27 47 08
Email: [EMAIL PROTECTED] Homepage: http://www.crc.dk
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Need to restart ypserv to update the nis maps

2008-08-11 Thread Stephen Harris
On Mon, Aug 11, 2008 at 11:05:58AM +0200, Theo Band wrote:
 I actually have problems that passwords don't get updated. I noticed 
 that by changing the home directory in /etc/passwd. When I change that 
 from /home/user to /nobackup/home/user it does work with ypcat passwd (I 
 see the correct path on the client). When I do cd ~user however, it 

Had you already done a cd ~user before the change?  Some shells cache
the home directory lookup so doesn't notice changes.

The other place to look into would be nscd; if you're running that
on the client then lookups are cached locally for a period of time.
This can result in changes not appearing on a client machine immediately.
ypcat talks directly to the NIS server, whereas the NS resolver
routines (nsswitch.conf entries) will utilise nscd if it's running.
What does getent passwd say?  That uses the OS resolver routines.
Or finger user?

You can test this on the client by
  service nscd stop
  rm /var/db/nscd/*
  service nscd start
and seeing if that works.

The fact that ypcat returns the right results means the _server_ is
working properly.

-- 

rgds
Stephen
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Need to restart ypserv to update the nis maps

2008-08-11 Thread Ralph Angenendt
Theo Band wrote:
 The problem is however that on the client, if I try to use the new data,  
 it still uses the old one. For instance cd ~john still directs me to  
 the old path instead of to the updated path (as correctly reported by  
 ypcat passwd).
 To solve it I need to restart the ypserv service on the nis server for  
 every change.

Are you running nscd, the name service caching daemon?

Ralph


pgpAtp80s6mp1.pgp
Description: PGP signature
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Need to restart ypserv to update the nis maps

2008-08-11 Thread James Pearson

Theo Band wrote:

Hi

I use NIS om my network (CentOS4.6). When an update on a map occurs 
(home directory changed in /etc/passwd for instance), I run make -C 
/var/yp/ and check the result on a client. On the client I use ypcat 
passwd and find indeed that the update has propagated (the clients run 
ypbind service). On the client I have configured /etc/nsswitch.conf with :

passwd: files nis
shadow: files nis
group:  files nis

The problem is however that on the client, if I try to use the new data, 
it still uses the old one. For instance cd ~john still directs me to 
the old path instead of to the updated path (as correctly reported by 
ypcat passwd).
To solve it I need to restart the ypserv service on the nis server for 
every change.


Does anyone now what could be the problem or where I should look? 
Apparently the OS gets password and user info using another way than the 
ypcat tool.


Are your running nscd on the clients?

If so, try disabling nscd and see if that make a difference.

James Pearson
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Need to restart ypserv to update the nis maps

2008-08-11 Thread Theo Band

Mogens Kjaer wrote:


Theo Band wrote:
...
The problem is however that on the client, if I try to use the new 
data, it still uses the old one. 


If you run authconfig-gtk on the client and look at the Options tab,
is Cache user information selected?

Mogens


I have not enabled this option. (Didn't realize it exists either...)

Theo
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos