Start a new topic
Answered

Copy/Create file in addition to folder upon user creation via CrushLDAP

 I would like to have a certain file be copied to a users directory that is created via the CrushLDAP plugin.  The file would be copied from a specific location (most likely on from the same server Crush is running on) to a user folder that is created when a new LDAP user logs in for the first time. 


How would I accomplish this?


Best Answer

You could do this with a crush task.  Add it for the on Connect event type for the ldap template user.


Do a Find for a filename, and if it doesn't find it, the task fails...so then do a find for the file you want, and a copy to copy it in.  Your job knows the current username, so that can be referenced with {user_name} to get where it needs to be.


Thanks,

Ben

1 Comment

Answer

You could do this with a crush task.  Add it for the on Connect event type for the ldap template user.


Do a Find for a filename, and if it doesn't find it, the task fails...so then do a find for the file you want, and a copy to copy it in.  Your job knows the current username, so that can be referenced with {user_name} to get where it needs to be.


Thanks,

Ben

Login to post a comment