[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: Invalid DN Syntax in Shell Script
- To: openldap-technical@openldap.org
- Subject: Re: Invalid DN Syntax in Shell Script
- From: "btb@bitrate.net" <btb@bitrate.net>
- Date: Thu, 28 Apr 2011 08:28:20 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=simple/simple; d=bitrate.net; s=default; t=1303993704; bh=F6LcV80/S6AXIrxOY5sOh2I8GEiTf07Vvbd5jJ9zwpk=; h=Message-ID:Date:From:MIME-Version:To:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=uK5SK3wjw6/y+l+QjeAgXlZKeEW9TsDV2XTATw+rz9TpeQiXPEuuaVCrofP31N4zG KxiQ+yEmz62yQzJ2eTKr4G6UsAflVmrQLdNWjVThalu9222ArZhuKXRaI/JT8mn6rM lt5Mr4Z+mZSOkS+Z9xAIEwXaopKWO95ecXYVm9I4=
- In-reply-to: <BANLkTimR3oEcNyjNa0dBoDOjEZ8cfvibcg@mail.gmail.com>
- References: <BANLkTimR3oEcNyjNa0dBoDOjEZ8cfvibcg@mail.gmail.com>
- User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9
On 2011.04.25 21.30, Inácio Alves wrote:
function verificaSenha(){
whoAmI=`whoami`
param=`echo "ldapsearch -x -W -D
\"uid=$whoAmI,ou=People,dc=ifce,dc=edu,dc=br\" -b \"dc=ifce,dc=edu,dc=br\"
\"(uid=$whoAmI)\""`
exec `echo "$param"`
}
i'm not sure what the goal is here, but it seems convoluted. if the goal is simply to run ldapsearch and print the output:
#!/bin/bash
function verify_user(){
user=$(whoami)
base_dn='dc=ifce,dc=edu,dc=br'
ldapsearch -xWD "uid=${user},ou=people,${base_dn}" -b "${base_dn}" "(uid=${user})"
}
verify_user
exit 0