Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 11-05-2009, 05:34 AM   #1
LQ Newbie
Registered: Nov 2009
Posts: 3

Rep: Reputation: 0
bash/php script which creates linux user...

I have got a little project I'm doing, I need to write a bash/php script which creates a linux user, MYSQL database, and emails them of such details.

How the script should be written or when can I find it?

Many thanks
Old 11-05-2009, 07:18 AM   #2
Registered: Mar 2009
Posts: 309

Rep: Reputation: 59
Well first off, the two should never be in the same script. Creating a local user account has nothing to do with creating a database. Look at the man page for useradd. It would be fairly easy to script that. What you can't do is set the password via a script. Decide if you want your script to be interactive, or read its input from a file. Just get started and post as you go. Take some small steps. The first thing you should do is check if the invoking person has the correct permissions to create a user account. Start with that, post what you get, and we can keep growing it.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Running a bash script in PHP Nerdstock2005 Programming 14 12-09-2008 04:28 PM
Is 'nice' inherited to child processes? e.g. bash script/php script that calls MySQL SirTristan Linux - Newbie 1 12-04-2008 01:57 AM
super user privileges check for a normal user in bash script freeindy Programming 2 08-01-2008 07:08 AM
Bash script creates blank file name snowman81 Programming 9 03-02-2008 11:37 PM
LXer: How to change Linux /UNIX system password-using a web based PHP script user interface LXer Syndicated Linux News 0 08-05-2006 09:33 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:23 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration