Sponsored Content
Top Forums UNIX for Advanced & Expert Users Determining if user is local-user in /etc/passwd or LDAP user Post 302416567 by jlliagre on Tuesday 27th of April 2010 03:08:00 AM
Old 04-27-2010
Code:
ldaplist passwd username

will tell if the user is defined in the ldap backend. It doesn't sort out the case where the user is defined in both /etc/passwd and ldap though.
 

10 More Discussions You Might Find Interesting

1. SuSE

user management - LDAP and local files

I am implementing LDAP on Linux based system using openldap. My management objects to the idea that all individual users will authenticate against an LDAP server because “what if it is not available” Their suggestion is that we run in parallel a set of local configured users and a set of LDAP... (1 Reply)
Discussion started by: scampi
1 Replies

2. Linux

ldap user disabled

Hi All, If ldap user is disabled on linux. Do you think ldap processes will still run while ldap user had been disabled? Thanks for any comment you may add. (2 Replies)
Discussion started by: itik
2 Replies

3. OS X (Apple)

Ho do I masquerade the "user@user.local" address in mail/mailx?

Hi, I'm brand new here and looking for a solution: I'm using mail or mailx. The default reply address is «myshortusername@mylongusername.local» which makes absolutely no sense for anybody receiving my emails. But how do I change it? There seem to be many solutions but none for Mac OS X.... (0 Replies)
Discussion started by: gczychi
0 Replies

4. Shell Programming and Scripting

Determining User Consumption in solaris

Inorder to find the user memory consumption I used the command: prstat -s cpu -a -n 10 But now I want to automate it and want to write the output to a file. How can I write the out put of user name and percentage of consumption alone to an output file.? (2 Replies)
Discussion started by: engineer
2 Replies

5. AIX

How to change normal user id to LDAP user id?

If I create a new user id test: mkuser id=400 test then I want it to LDAP user: chuser -R LDAP SYSTEM=LDAP registry=LDAP test It shows: 3004-687 User "test" does not exist. How to do? (4 Replies)
Discussion started by: rainbow_bean
4 Replies

6. Shell Programming and Scripting

switch user from local user to root in perl

Hi Gurus, I have a script that requires me to switch from local user to root. Anyone who has an idea on this since when i switch user to root it requires me to input root password. It seems that i need to use expect module here, but i don't know how to create the object for this. ... (1 Reply)
Discussion started by: linuxgeek
1 Replies

7. Red Hat

Ldap user does not exists

Hi all, Hope everyone doing good. Let me come to point, i have setup-ed a LDAP server and client machines Server works perfect, while make a search from client machine it too get the Query from LDAP server, But while i switch user it says user not exists # su - babin su: user babin does... (3 Replies)
Discussion started by: babinlonston
3 Replies

8. AIX

Mix LDAP and LOCAL user on AIX

Hello, I'm currently trying to mix local and LDAP users on an AIX 7.1. I've triied many things. My LDAP Server in on a CentOS - OpenLDAP (which works fine with linux). I'm currently stuck on AIX at how to declare LDAP AND Local users. Here's what i did : /usr/sbin/mksecldap -c -h 'ldap03'... (15 Replies)
Discussion started by: AIX_user_324891
15 Replies

9. Shell Programming and Scripting

How to Switch from Local user to root user from a shell script?

Hi, I need to switch from local user to root user in a shell script. I need to make it automated so that it doesn't prompt for the root password. I heard the su command will do that work but it prompt for the password. and also can someone tell me whether su command spawns a new shell or... (1 Reply)
Discussion started by: Little
1 Replies

10. UNIX for Advanced & Expert Users

Pam.d and make difference between AD User and local user on Linux

Hello, i configured rhel linux 6 with AD directory to authorize windows users to connect on the system and it works. i have accounts with high privileges (oracle for example) if an account is created on the AD server i would to block him. I looked for how to do, for the moment all the... (3 Replies)
Discussion started by: vincenzo
3 Replies
ldaplist(1)                                                        User Commands                                                       ldaplist(1)

NAME
ldaplist - search and list naming information from an LDAP directory using the configured profile SYNOPSIS
/usr/bin/ldaplist [-dlv] [database [key]...] /usr/bin/ldaplist -h DESCRIPTION
The ldaplist utility searches for and lists the naming information from the LDAP directory service defined in the LDAP configuration files generated by ldapclient(1M) during the client initialization phase. The Solaris LDAP client must be set up in order to use this utility. The database is either a container name or a database name as defined in nsswitch.conf(4). A container is a non-leaf entry in the Directory Information Tree (DIT) that contains naming service information. The container name is the LDAP Relative Distinguished Name (RDN) of the container relative to the defaultSearchBase as defined in the configuration files. For example, for a container named ou=people, the data- base name is the database specified in nsswitch.conf. This database is mapped to a container, for example, passwd maps to ou=people. If an invalid database is specified, it will be mapped to a generic container, for example, nisMapName=name). The key is the attribute value to be searched in the database. You can specify more than one key to be searched in the same database. The key can be specified in either of two forms: attribute=value or value. In the first case, ldaplist passes the search key to the server. In the latter case, an attribute is assigned depending on how the database is specified. If the database is a container name, then the "cn" attribute type is used. If the database is a valid database name as defined in the nsswitch.conf, then a predefined attribute type is used (see table below). If the database is an invalid database name, then cn is used as the attribute type. The ldaplist utility relies on the Schema defined in the RFC 2307bis, currently an IETF draft. The data stored on the LDAP server must be stored based on this Schema, unless the profile contains schema mapping definitions. For more information on schema mapping see ldap- client(1M). The following table lists the default mapping from the database names to the container, the LDAP object class, and the attribute type used if not defined in the key. Database Object Class Attribute Type Container aliases mailGroup cn ou=Aliases automount nisObject cn automountMapName=auto_* bootparams bootableDevice cn ou=Ethers ethers ieee802Device cn ou=Ethers group posixgroup cn ou=Group hosts ipHost cn ou=Hosts ipnodes ipHost cn ou=Hosts netgroup ipNetgroup cn ou=Netgroup netmasks ipNetwork ipnetworknumber ou=Networks networks ipNetwork ipnetworknumber ou=Networks passwd posixAccount uid ou=People protocols ipProtocol cn ou=Protocols publickey nisKeyObject uidnumber ou=People cn ou=Hosts rpc oncRpc cn ou=Rpc services ipService cn ou=Services printers printerService printer-uri ou=printers auth_attr SolarisAuthAttr nameT ou=SolarisAuthAttr prof_attr SolarisProfAttr nameT ou=SolarisProfAttr exec_attr SolarisExecAttr nameT ou=SolarisProfAttr user_attr SolarisUserAttr uidT ou=people audit_user SolarisAuditUser uidT ou=people o For the automount database, auto_*, in the container column, represents auto_home, auto_direct, ... o For the publickey database, if the key starts with a digit, it will be interpreted as an uid number. If the key starts with a non- digit, it will be interpreted as a host name. The ldaplist utility supports substring search by using the wildcard "*" in the key. For example, "my*" will match any strings that starts with "my". In some shell environments, keys containing the wildcard may need to be quoted. If the key is not specified, all the containers in the current search baseDN will be listed. OPTIONS
The following options are supported: -d Lists the attributes for the specified database, rather than the entries. By default, the entries are listed. -h Lists the database mapping. -l Lists all the attributes for each entry matching the search criteria. By default, ldaplist lists only the Distinguished Name of the entries found. -v Sets verbose mode. The ldaplist utility will also print the filter used to search for the entry. The filter will be prefixed with "+++". EXAMPLES
Example 1: Listing All Entries in the Hosts Database example% ldaplist hosts Example 2: Listing All Entries in a Non-Standard Database ou=new example% ldaplist ou=new Example 3: Finding "user1" in the passwd Database example% ldaplist passwd user1 Example 4: Finding the Entry With Service Port of 4045 in the services Database example% ldaplist services ipServicePort=4045 Example 5: Finding All Users With Username Starting with new in the passwd Database example% ldaplist passwd 'new*' Example 6: Listing the Attributes for the hosts Database example% ldaplist -d hosts EXIT STATUS
The following exit values are returned: 0 Successfully matched some entries. 1 Successfully searched the table and no matches were found. 2 An error occurred. An error message is output. FILES
/var/ldap/ldap_client_file Files that contain the LDAP configuration of the client. Do not manually modify these files. Their content /var/ldap/ldap_client_cred is not guaranteed to be human readable. To update these files, use ldapclient(1M) ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWnisu | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ SEE ALSO
ldap(1), ldapadd(1), ldapdelete(1), ldapmodify(1), ldapmodrdn(1), ldapsearch(1), idsconfig(1M), ldap_cachemgr(1M), ldapaddent(1M), ldap- client(1M), suninstall(1M), resolv.conf(4), attributes(5) NOTES
RFC 2307bis is an IETF informational document in draft stage that defines an approach for using LDAP as a naming service. SunOS 5.10 16 Jan 2004 ldaplist(1)
All times are GMT -4. The time now is 02:44 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy