Sponsored Content
Full Discussion: Ldap user does not exists
Operating Systems Linux Red Hat Ldap user does not exists Post 302915017 by babinlonston on Saturday 30th of August 2014 03:04:06 PM
Old 08-30-2014
Linux 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

Code:
[root@ldapc ~]# su - babin
su: user babin does not exist

I have tried this from client machine and i got the below reply

Quote:
# ldapsearch -x -b dc=tecmintlocal,dc=com -h ldap.tecmintlocal.com
---------------------------------

Code:
# extended LDIF
#
# LDAPv3
# base <dc=tecmintlocal,dc=com> with scope subtree
# filter: (objectclass=*)
# requesting: ALL
#

# tecmintlocal.com
dn: dc=tecmintlocal,dc=com
dc: tecmintlocal
objectClass: top
objectClass: domain

# People, tecmintlocal.com
dn: ou=People,dc=tecmintlocal,dc=com
ou: People
objectClass: top
objectClass: organizationalUnit

# Group, tecmintlocal.com
dn: ou=Group,dc=tecmintlocal,dc=com
ou: Group
objectClass: top
objectClass: organizationalUnit

# tecmint_gp1, Group, tecmintlocal.com
dn: cn=tecmint_gp1,ou=Group,dc=tecmintlocal,dc=com
objectClass: posixGroup
objectClass: top
cn: tecmint_gp1
userPassword:: YWRtaW4xMjMk
gidNumber: 20000

# babin, People, tecmintlocal.com
dn: uid=babin,ou=People,dc=tecmintlocal,dc=com
uid: babin
cn: babin babin
objectClass: account
objectClass: posixAccount
objectClass: top
objectClass: shadowAccount
userPassword:: YWRtaW4xMjMk
shadowLastChange: 16120
shadowMin: 0
shadowMax: 99999
shadowWarning: 7
loginShell: /bin/bash
uidNumber: 2000
gidNumber: 20000
homeDirectory: /home/babin

# tecmintclient, People, tecmintlocal.com
dn: uid=tecmintclient,ou=People,dc=tecmintlocal,dc=com
uid: tecmintclient
cn: tecmintclient tecmintclient
objectClass: account
objectClass: posixAccount
objectClass: top
objectClass: shadowAccount
userPassword:: YWRtaW4xMjMk
shadowLastChange: 16120
shadowMin: 0
shadowMax: 99999
shadowWarning: 7
loginShell: /bin/bash
uidNumber: 2000
gidNumber: 20000
homeDirectory: /home/tecmintclient

# search result
search: 2
result: 0 Success

# numResponses: 7
# numEntries: 6

 

10 More Discussions You Might Find Interesting

1. SCO

Need Script to check whether user exists in the remote machine

Hi All, I am new to shell scripting. Can someone let me know, how to check whether the user exists in the remote system? I am building a new unix box and before I proceed installing the appliation , I want to check whether the required users are created in the system . how to do this ?... (1 Reply)
Discussion started by: Srini75
1 Replies

2. Shell Programming and Scripting

Good (reliable!) check if user exists

Hi all, I've been trying to find a good check I can put it in to a shell script to see if a given user exists. Some of the things I've thought about is checking whether they have a home directory, but not all users have a home directory. I've thought about grepping the /etc/passwd file for... (4 Replies)
Discussion started by: _Spare_Ribs_
4 Replies

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

4. AIX

LDAP user authentication issue

Hello everyone, hoping you can provide some incite with a little problem I'm having.. I have the LDAP client configured and running on my AIX 5.3 server, which is authenticating against an eDirectory LDAP server. I can login via LDAP no problems on the AIX server with newly created users,... (4 Replies)
Discussion started by: j_aix
4 Replies

5. Shell Programming and Scripting

Check if user exists shell

Hello! I'm stuck with a problem that i can't solve. I'm very new to unix, linux and shell scripting i might add. I'm trying to create a script that will execute as follows: First start the script - sh exist Then the prompt asks the user to input a username to check if it exists within the... (6 Replies)
Discussion started by: bib2006
6 Replies

6. Shell Programming and Scripting

LDAP user script

I am converting all users on all AIX systems to LDAP users. As such, I must delete the local user, and recreate the user via LDAP. When I delete the local user, all files and directories owned by the local user will revert to the UID. I need a script to find all files and directories belonging... (1 Reply)
Discussion started by: andybren
1 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. Solaris

Find a whether user exists or not.

Hi all, to find a user whether he had an account on AIX box i will use commands like "finger" , "lsuser". I am new to solaris and we are migrating to solaris. now i am using " more /etc/passwd | grep -i <UserID> " to find a user present in that solaris box or not. Are der any similar... (9 Replies)
Discussion started by: firestar
9 Replies

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

10. 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
Authen::Simple::LDAP(3pm)				User Contributed Perl Documentation				 Authen::Simple::LDAP(3pm)

NAME
Authen::Simple::LDAP - Simple LDAP authentication SYNOPSIS
use Authen::Simple::LDAP; my $ldap = Authen::Simple::LDAP->new( host => 'ldap.company.com', basedn => 'ou=People,dc=company,dc=net' ); if ( $ldap->authenticate( $username, $password ) ) { # successfull authentication } # or as a mod_perl Authen handler PerlModule Authen::Simple::Apache PerlModule Authen::Simple::LDAP PerlSetVar AuthenSimpleLDAP_host "ldap.company.com" PerlSetVar AuthenSimpleLDAP_basedn "ou=People,dc=company,dc=net" <Location /protected> PerlAuthenHandler Authen::Simple::LDAP AuthType Basic AuthName "Protected Area" Require valid-user </Location> DESCRIPTION
Authenticate against a LDAP service. METHODS
o new This method takes a hash of parameters. The following options are valid: o host Connection host, can be a hostname, IP number or a URI. Defaults to "localhost". host => ldap.company.com host => 10.0.0.1 host => ldap://ldap.company.com:389 host => ldaps://ldap.company.com o port Connection port, default to 389. May be overridden by host if host is a URI. port => 389 o timeout Connection timeout, defaults to 60. timeout => 60 o version The LDAP version to use, defaults to 3. version => 3 o binddn The distinguished name to bind to the server with, defaults to bind anonymously. binddn => 'uid=proxy,cn=users,dc=company,dc=com' o bindpw The credentials to bind with. bindpw => 'secret' o basedn The distinguished name of the search base. basedn => 'cn=users,dc=company,dc=com' o filter LDAP filter to use in search, defaults to "(uid=%s)". filter => '(uid=%s)' o scope The search scope, can be "base", "one" or "sub", defaults to "sub". filter => 'sub' o log Any object that supports "debug", "info", "error" and "warn". log => Log::Log4perl->get_logger('Authen::Simple::LDAP') o authenticate( $username, $password ) Returns true on success and false on failure. EXAMPLE USAGE
Apple Open Directory my $ldap = Authen::Simple::LDAP->new( host => 'od.company.com', basedn => 'cn=users,dc=company,dc=com', filter => '(&(objectClass=inetOrgPerson)(objectClass=posixAccount)(uid=%s))' ); Microsoft Active Directory my $ldap = Authen::Simple::LDAP->new( host => 'ad.company.com', binddn => 'proxyuser@company.com', bindpw => 'secret', basedn => 'cn=users,dc=company,dc=com', filter => '(&(objectClass=organizationalPerson)(objectClass=user)(sAMAccountName=%s))' ); Active Directory by default does not allow anonymous binds. It's recommended that a proxy user is used that has sufficient rights to search the desired tree and attributes. SEE ALSO
Authen::Simple::ActiveDirectory. Authen::Simple. Net::LDAP. AUTHOR
Christian Hansen "chansen@cpan.org" COPYRIGHT
This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2012-04-23 Authen::Simple::LDAP(3pm)
All times are GMT -4. The time now is 06:05 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy