NIS+ to LDAP


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users NIS+ to LDAP
# 1  
Old 06-23-2009
NIS+ to LDAP

After months of threats, we're finally migrating servers from NIS+ to LDAP. Smilie I'm happy using niscat, nisgrep etc and now it seems I have to use ldapsearch which is far from being a simple CLI!
Are there any easy (easier?) ways to interrogate the LDAP directory? Smilie

Jerry
# 2  
Old 06-23-2009
Well you could use getent.

getent passwd <username> is like ypmatch <username> passwd
getent hosts <hostname> is like ypmatch <hostname> hosts
# 3  
Old 06-25-2009
I already use getent for passwd, group etc. but it doesn't work for other tables (scsu, scsudo etc)Smilie

Since my original post, I've come up with my own quick and dirty solution...

The following has been added to my profile
Code:
ldap() {
if [ -z $2 ] ; then
ldapsearch -h <host> -b ou=$1,dc=euruxdev,dc=dyn,dc=nsroot,dc=net objectclass='*'
else
ldapsearch -h <host> -b ou=$1,dc=euruxdev,dc=dyn,dc=nsroot,dc=net $2
fi

So if I type
ldap <table>
I get the whole lot, but I can add a filter with, for example
ldap <table> cn=<entry>

Jerry
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

LDAP Client not connecting to LDAP server

I have very limited knowledge on LDAP configuration and have been trying fix one issue, but unsuccessful. The server, I am working on, is Solaris-10 zone. sudoers is configured on LDAP (its not on local server). I have access to login directly on server with root, but somehow sudo is not working... (9 Replies)
Discussion started by: solaris_1977
9 Replies

2. UNIX for Advanced & Expert Users

How to find out which server is LDAP/NIS master?

I have some scripts where I go and do some LDAP/NIS queries to report on users on Unix servers. What I am trying to figure out is, how do I know which server is the LDAP? The configs have been in place long before I took over so was hoping someone had some insight on how to figure this out. I must... (1 Reply)
Discussion started by: dagamier
1 Replies

3. Cybersecurity

LDAP rfc2307bis.schema or nis.schema?

Hi guys, we are implementing new ldap in our organization exclusively for Linux authentication purposes. As we are new to the subject, I would appreciate help regarding which schema to use to create group of users and accounts / passwords entries? I see both schemas listed in subject above... (0 Replies)
Discussion started by: Lastminute
0 Replies

4. UNIX for Advanced & Expert Users

NIS-to-LDAP translation tools (yp2ldap)

I've recently published a set of tools that allow you to continue to use the ypwhich, ypcat and ypmatch tools in an environment where NIS maps have been migrated to LDAP using the RFC2307 schema. Traditionally in such an environment, only the NSS functionality is LDAP-enabled, meaning that... (0 Replies)
Discussion started by: cambridge
0 Replies

5. Shell Programming and Scripting

Validating that the NIS and NIS+ services are disabled

I'm creating a scrip for auditing our AIX box's to ensure that they are built according to our system standards. I'm not sure on the logic for checking to see if the NIS and NIS+ services are disabled. any idea's? (2 Replies)
Discussion started by: sport
2 Replies

6. HP-UX

Configure DNS,NFS,NIS,LDAP and LVM(mirror,sparing and multipathing)

Hello All, I am a newbee in HP UX wanted to know how to configure DNS,NFS,NIS,LDAP and LVM(mirror,sparing and multipathing) in HP UX 11iv2 and v3 and i did go through some of the docs on hp.com but i think those are for experience UX users and i am new to this so if some one could just mention... (1 Reply)
Discussion started by: coolsami
1 Replies

7. Solaris

How to configure a NIS client bound to the NIS server in another subnet?

Hi, all. I have a Solaris client here needs to bind to NIS server in another subnet. Following is the configuration i made on the client, 1) edit /etc/inet/hosts to add an entry of the NIS server -- nserver01 2) execute `domainname` to set local NIS domain to the domain of the NIS server.... (1 Reply)
Discussion started by: sn_wukong
1 Replies

8. UNIX for Advanced & Expert Users

SUSE 9 and 10 NIS clients with RedHat 8.0 NIS server not working

We have a RedHat 8.0 NIS master, with a RedHat 8.0 NIS Slave. We also have a small number of SUSE 9.1 and SUSE 10 machines here for evaluation. However, no matter what i do, the SUSE machines will not talk to the NIS Servers. If i broadcast for NIS Servers for the specified NIS domain, it... (1 Reply)
Discussion started by: fishsponge
1 Replies

9. UNIX for Dummies Questions & Answers

NIS map mail.aliases specified, but NIS not running

Hi all, I just took over the admin role from someone and I wanna setup sendmail (just to send mail from the host) however, after I config all the resolv.conf, nssitch.conf, hosts file and when I try to send a mail out, after I punched ctl-D, it returned he following, "NIS map mail.aliases... (2 Replies)
Discussion started by: stancwong
2 Replies

10. UNIX for Dummies Questions & Answers

ldap replacement NIS

Hi, I am a solaris administrator who is currently working in a solaris 2.6,7,8,9 environment. We are using NIS for centralised account authentication, groups, host name resolution and most importantly automounting. NIS , over the last few months has been rearing its notorious ugly head, and to be... (1 Reply)
Discussion started by: hcclnoodles
1 Replies
Login or Register to Ask a Question