Linux.com

Home Learn Linux Linux Answers Retrieve EMail address from Active Directory in a bash script
Answers
  • Forgot to mention a thing:
    I've tried to get some info from AD with PHP and I can, is there a way to get something without installing the whole php-cli and libs ?

    Thanks
    Ben

    Answered by Andrea Benini
    5 years ago
    0 0
  • Forgot to mention a thing:
    I've tried to get some info from AD with PHP and I can, is there a way to get something without installing the whole php-cli and libs ?

    Thanks
    Ben

    Answered by Andrea Benini
    5 years ago
    0 0
  • Forgot to mention a thing:
    I've tried to get some info from AD with PHP and I can, is there a way to get something without installing the whole php-cli and libs ?

    Thanks
    Ben

    Answered by Andrea Benini
    5 years ago
    0 0
  • found a link explaining capabilities of ldap-search package and various utilities but i think it's too limited, in my case I need to retrieve email address as well as other information from AD Tree, just solved using PHP. Of course Python and other folks can do the same as well

    Answered by Andrea Benini
    5 years ago
    0 0
  • found a link explaining capabilities of ldap-search package and various utilities but i think it's too limited, in my case I need to retrieve email address as well as other information from AD Tree, just solved using PHP. Of course Python and other folks can do the same as well

    Answered by Andrea Benini
    5 years ago
    0 0
  • found a link explaining capabilities of ldap-search package and various utilities but i think it's too limited, in my case I need to retrieve email address as well as other information from AD Tree, just solved using PHP. Of course Python and other folks can do the same as well

    Answered by Andrea Benini
    5 years ago
    0 0
  • Using the ldapsearch tool is a quick and easy way to pull information from AD.

    the following command (substitute your directory info) can easily pull an email address from AD

    ldapsearch -x -h -s sub -b dc=,dc=COM -D "CN=your id,DC=,DC=COM" -W '(&(objectclass=User)(givenName=firstname)(sn=lastname))' mail

    wrapping the above in a shell script is trivial. use the command above and leave off 'mail' at the end. it should bring up all attributes that you can see.

    Answered by Jesse Book
    5 years ago
    0 1
  • Using the ldapsearch tool is a quick and easy way to pull information from AD.

    the following command (substitute your directory info) can easily pull an email address from AD

    ldapsearch -x -h -s sub -b dc=,dc=COM -D "CN=your id,DC=,DC=COM" -W '(&(objectclass=User)(givenName=firstname)(sn=lastname))' mail

    wrapping the above in a shell script is trivial. use the command above and leave off 'mail' at the end. it should bring up all attributes that you can see.

    Answered by Jesse Book
    5 years ago
    0 1
  • Using the ldapsearch tool is a quick and easy way to pull information from AD.

    the following command (substitute your directory info) can easily pull an email address from AD

    ldapsearch -x -h -s sub -b dc=,dc=COM -D "CN=your id,DC=,DC=COM" -W '(&(objectclass=User)(givenName=firstname)(sn=lastname))' mail

    wrapping the above in a shell script is trivial. use the command above and leave off 'mail' at the end. it should bring up all attributes that you can see.

    Answered by Jesse Book
    5 years ago
    0 1
  • I've now solved with PHP but Jesse solution is what I was looking for, nice trick :-)

    Answered by Andrea Benini
    5 years ago
    0 0
  • I've now solved with PHP but Jesse solution is what I was looking for, nice trick :-)

    Answered by Andrea Benini
    5 years ago
    0 0
  • I've now solved with PHP but Jesse solution is what I was looking for, nice trick :-)

    Answered by Andrea Benini
    5 years ago
    0 0
Please register/login to answer this question. Click here to login
Similar Questions Found
Questions from category Root

Upcoming Linux Foundation Courses

  1. LFS426 Linux Performance Tuning
    21 Apr » 24 Apr - Virtual
    Details
  2. LFS520 OpenStack Cloud Architecture and Deployment
    05 May » 09 May - Virtual
    Details
  3. LFD320 Linux Kernel Internals and Debugging
    12 May » 16 May - Virtual
    Details

View All Upcoming Courses

Community Answers - Search


Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board