Sponsored Content
Top Forums UNIX for Dummies Questions & Answers ldap , search groups that user belong Post 302682371 by jlliagre on Monday 6th of August 2012 07:23:03 AM
Old 08-06-2012
Code:
ldapsearch -h host -p port -D "bindDN" -w  "password" -b "DC=mydomain" -s sub "(uniquemember=CN=name,CN=Users,DC=mydomain)" dn

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

User groups

Hi I have a user zak and 4 groups:- oracle stats data archive I want user zak to be part of the oracle and stats group but not be able to view,list anything in data and archive. Also anyone in the data and archive group should not be able to view,list anything in oracle and stats....... (3 Replies)
Discussion started by: Zak
3 Replies

2. Solaris

Setting user groups

Hi......... I'm trying to set a group of users to login to do a required super-user tasks without knowing the super-user passwd. For example...a user popodude logs in as self with passwd..system accepts the password & then automatically asks for the super-user account passwd. My goal is... (1 Reply)
Discussion started by: Remi
1 Replies

3. Solaris

sudoers file with groups in LDAP

Hello gurus, I've been working on a sudoers file to work with groups in LDAP. I've created the groups in LDAP and added the users to there respective groups. I've also setup my sudoers file to have the groups match what is in LDAP. And I've added ldap to nsswitch.conf in the group line. The... (6 Replies)
Discussion started by: em23
6 Replies

4. Red Hat

LDAP auth, secondary groups doesnt works

RedHat ELS 5.2 & Sun directory getent passwd: works toto:*:1000:100:toto:/home/toto:/bin/bash getent group: works mygroup:*:10001:1000,1001 but id toto doesnt works :( uid=1000(toto) gid=100(users) groupes=100(users) BTW in /etc/ldap.conf i use a different mapping for the posix... (4 Replies)
Discussion started by: sncr24
4 Replies

5. AIX

user & groups

1 - what is the maximum no: of groups a user can be a part of ? 2 - what is maximum no: of users a group can contain ? (6 Replies)
Discussion started by: senmak
6 Replies

6. Linux

Secondary groups not working with NFS (+LDAP)

I´m using LDAP for groups and NFS for home dirs. My problem is as follows: I only have a few groups, so it's not the problem everyone else had. When I've mounted a disk over NFS, I need to have my primary group in order to read in the groups I'm a member of. Secondary groups is not working. ... (0 Replies)
Discussion started by: velmont
0 Replies

7. UNIX for Advanced & Expert Users

Determining if user is local-user in /etc/passwd or LDAP user

Besides doing some shell-script which loops through /etc/passwd, I was wondering if there was some command that would tell me, like an enhanced version of getent. The Operating system is Solaris 10 (recent-ish revision) using Sun DS for LDAP. (5 Replies)
Discussion started by: ckmehta
5 Replies

8. UNIX for Advanced & Expert Users

ldap search to find dn for user

How can I do a ldapsearch to find a DN for a user when I know the exact cn for that user out of active directory. I have tried several different commands (hundreds) but need the -b with the full dn to perform the search using ldapsearch from AIX. I am trying to find the OU for a user and the... (1 Reply)
Discussion started by: cchart3
1 Replies

9. 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

10. Shell Programming and Scripting

Urgent...Need a shell script to list files which belong to particular groups

Hi, I am just new to scripting but got to write a complex scipt please help. i need a shell script which can check the list of data listed in a txt doc and see if they belong to any of the groups that are listed in other list file.... (5 Replies)
Discussion started by: draghun9
5 Replies
HOSTNAMEUTILS(1)					   Sun Grid Engine User Commands					  HOSTNAMEUTILS(1)

NAME
sge_hostnameutils.1 - SGE Host name utilities gethostname - get local hostname. gethostbyname - get local host information for specified hostname. gethostbyaddr - get hostname via IP address. getservbyname - get configured port number of service SYNTAX
gethostname [-help|-name|-aname|-all] gethostbyname [-help|-name|-aname|-all] <name> gethostbyaddr [-help|-name|-aname|-all] <ip> getservbyname [-help|-number] <service> DESCRIPTION
gethostname and gethostbyname are used to get the local resolved host name. gethostbyaddr is used to get the hostname of a specified IP address (dotted decimal notation). getservbyname can be used to get the configured port number of a service (e.g. from /etc/services). The hostname utils are primarily used by the Sun Grid Engine installation scripts. gethostname , gethostbyname and gethostbyaddr called without any option will print out the hostname, all specified aliases, and the IP address of the locally resolved hostname. Calling get- servbyname without any option will print out the full service entry. OPTIONS
-help Prints a list of all options. -name This option only reports the primary name of the host. -aname If this option is set, the Sun Grid Engine host alias file is used for host name resolving. It is necessary to set the environment variable SGE_ROOT and, if more than one cell is defined, also SGE_CELL. This option will print out the Sun Grid Engine host name. -all By using the -all option all available host information will be printed. This information includes the host name, the Sun Grid Engine host name, all host aliases, and the IP address of the host. -number This option will print out the port number of the specified service name. <name> The host name for which the information is requested. <ip> The IP address (dotted decimal notation) for which the information is requested. <service> The service name for which the information is requested (e.g. ftp, sge_qmaster or sge_execd). EXAMPLES
The following example shows how to get the port number of the FTP service: >getservbyname -number ftp 21 The next example shows the output of gethostname -all when the host alias file contains this line: gridmaster extern_name extern_name.mydomain The local host resolving must also provide the alias name "gridmaster". Each Sun Grid Engine host that wants to use the cluster must be able to resolve the host name "gridmaster". To setup an alias name, edit your /etc/hosts file or modify your NIS setup to provide the alias for the NIS clients. The host alias file must be readable from each host (use e.g. NFS shared file location). >gethostname -all Hostname: extern_name.mydomain SGE name: gridmaster Aliases: loghost gridmaster Host Address(es): 192.168.143.99 ENVIRONMENTAL VARIABLES
SGE_ROOT Specifies the location of the Sun Grid Engine standard configuration files. SGE_CELL If set, specifies the default Sun Grid Engine cell. SEE ALSO
sge_intro(1), host_aliases(5), COPYRIGHT
See sge_intro(1) for a full statement of rights and permissions. SGE 6.2u5 $Date$ HOSTNAMEUTILS(1)
All times are GMT -4. The time now is 04:36 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy