LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 11-05-2009, 04:34 AM   #1
tifoso
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, 06:18 AM   #2
bradvan
Member
 
Registered: Mar 2009
Posts: 367

Rep: Reputation: 61
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.
 
  


Reply



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 03:28 PM
Is 'nice' inherited to child processes? e.g. bash script/php script that calls MySQL SirTristan Linux - Newbie 1 12-04-2008 12:57 AM
super user privileges check for a normal user in bash script freeindy Programming 2 08-01-2008 06:08 AM
Bash script creates blank file name snowman81 Programming 9 03-02-2008 10: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 08:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:12 PM.

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