I have migrated from NIS to LDAP a short while ago, and there's one thing I'm not too happy with.
With NIS and compat is /etc/nsswitch.conf ; you could override stuff like shells by having an entry in /etc/master.passwd starting with a +
like:
+ indicated to check in NIS , and replace the shell for that particular user.
I could put an entry like:
And no-one would have access to that machine, but users declared above that entry.
I have tried changins nsswitch.conf to reproduce such behaviour, and to some extent it does work.
However, with this configuration, there are plenty of downside. For a start, user aliases do not work. I can't do su - another user (password is always refused)
What would be the best approach to have a straight replacement of nis with ldap for such matter ?
So I can override some login properties easily ?
Thank you
JY
With NIS and compat is /etc/nsswitch.conf ; you could override stuff like shells by having an entry in /etc/master.passwd starting with a +
like:
Code:
+jya:*:::::::/bin/sh
+ indicated to check in NIS , and replace the shell for that particular user.
I could put an entry like:
Code:
+:::::::::/usr/sbin/nologin
And no-one would have access to that machine, but users declared above that entry.
I have tried changins nsswitch.conf to reproduce such behaviour, and to some extent it does work.
Code:
server4# cat /etc/nsswitch.conf
#
# nsswitch.conf(5) - name service switch configuration file
# $FreeBSD: src/etc/nsswitch.conf,v 1.1.10.1 2009/08/03 08:13:06 kensmith Exp $
#
group: compat
group_compat: ldap
hosts: files dns
networks: files
passwd: compat
passwd_compat: ldap
shells: files
services: files
protocols: files
rpc: files
However, with this configuration, there are plenty of downside. For a start, user aliases do not work. I can't do su - another user (password is always refused)
What would be the best approach to have a straight replacement of nis with ldap for such matter ?
So I can override some login properties easily ?
Thank you
JY