LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 04-05-2006, 10:19 AM   #1
murder
LQ Newbie
 
Registered: Aug 2005
Posts: 29

Rep: Reputation: 15
User Script


im trying to build a php control panel for game servers and i want to use proftpd and i would love to actually use real user accounts rather than a fake database like with pure-ftpd but im trying to make it as automated as i can and ive come to a stoping point cause i cant get the user account to setup right. my problem is when i add the user like
Code:
adduser -p foospass foo
it adds the password but its not encrypted so it when i try to log in it fails of course. yes i can go and change the password manually with the "passwd" command but then it defeats the whole purpose of autmation. ive tried it both ways using php to create the user with the "exec();" command and trying to have it just exec a shell script neither way works it doesnt even work manually with the command line. is there anyway to do to all in one command or without being prompted to re-enter the password with the "passwd" command?

Fedora Core 4
i386

thanks
Josh
 
Old 04-05-2006, 12:11 PM   #2
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
you could try doing a command like "adduser foo && passwd foo < foopass" but the problem is you'd need to give the same password twice, and I don't know atm would "passwd foo < foopass < foopass" work, and I'm in a bit of a hurry right now, but you could try that..a more nice way would really be to write a script file..well gotta go now, but try that

"command1 && command2" means to run command1, and if it's successful (no errors) then and only then run command2. the "<" means to feed the following input to the command on the left..well one could write a book on these things, but that's the story cut short
 
Old 04-05-2006, 12:19 PM   #3
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 55
Quote:
Originally Posted by murder
use proftpd and i would love to actually use real user accounts rather than a fake database like with pure-ftpd
The advantage of using an own user-account database is security: if somebody cracks the password of the ftp server, he won't be able to connect to this machine on a unix service like ssh. This password is local to the ftp server.
 
  


Reply


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how do I make sure that the user that is going to run the script is a root user??? nikold01 Linux - General 3 09-10-2004 08:54 AM
user script haggertus Linux - Newbie 4 10-30-2003 03:26 PM
add user script? ezra143 Linux - Software 2 10-22-2003 12:21 AM
Create user script kelper Linux - Software 1 06-24-2003 10:32 PM
User automation Script Pigdog Linux - Networking 1 02-26-2003 03:01 PM


All times are GMT -5. The time now is 10:10 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration