Register
It is currently Sun Sep 14, 2014 8:01 pm

Creating users


All times are UTC - 6 hours


Post new topic Reply to topic  [ 2 posts ] 
Author Message
 PostPosted: Mon Dec 19, 2011 4:48 am   

Joined: Mon Dec 19, 2011 4:39 am
Posts: 2
Hi, I need a script that can look into a MySQL DB and grab certain details such as username and password.

And then create a local user account, home directory and MySQL user for each user listed in the MySQL table.

Then i need the script to change each record so that each user isn't recreated when the script is next run.

Query example:
SELECT username, password FROM user WHERE approved = "no"

Cheers Dan


Top
 Profile  
 PostPosted: Mon Dec 19, 2011 9:08 am   
Moderator
User avatar

Joined: Wed May 03, 2006 2:05 pm
Posts: 242
Hi Dan!

What have you tried so far? You can use the '-e' flag to mysql to execute queries from a bash script, or there are more complicated methods.


Top
 Profile YIM  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP