Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!

Notices

Welcome to LinuxQuestions.org, a friendly and active Linux Community.

You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!

Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.

If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.

Having a problem logging in? Please visit this page to clear all LQ-related cookies.

Introduction to Linux - A Hands on Guide

This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.

Hi, I am fairly new to the Linux world and am trying to get my Active Directory to sync with Google Apps. I have used Google Apps Directory Sync tool to set this up, but I only want the sync to run when someone changes their password. So that I don't run the sync every five minutes unnecessarily.

To achieve this, I am trying to write a bash script that will use ldapsearch to query AD for all users and sort by the division attribute. Since that is where the hash password is being stored using the sha1hexfltr (http://code.google.com/p/sha1hexfltr/)

I then want this to be exported into a file and have the script always comparing the new exported file to the old one. Then if the script is different (having a different value in the division attribute, signifying a changed password), then it will run the sync.

I am planning on scheduling this as a chron job about every five minutes, and then the goal will be that it kicks off the ad -> google sync only when a password has changed.

This works with a "-W" and prompts for a password, but when I try to do a "-w", it gives an error that says

"bash: password: event not found"

Since I am trying to include this in a bash script, my goal is to not have to be prompted for a password. I also tried setting up SASSL, but was unsuccessful with this method as well. Any help would be greatly appreciated.

Please let me know if this all makes sense or if I need to include additional information with this.

With or without the quotes it gives the same error "bash: password: event not found". It works when prompting for a password with the -W switch, but as soon as I try to include the password, it gives an error. Do you know if there is a way to include the password in a file? Any ideas would be helpful.