LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-29-2005, 09:45 PM   #1
whysyn
Member
 
Registered: Jun 2003
Location: Cleveburg, OH
Distribution: mostly Fedora
Posts: 154

Rep: Reputation: 30
/etc/passwd & /etc/shadow through php?


Hi Guys,

Are there PHP functions that will replicate the functionality of the "useradd" "userdel" and "passwd" shell commands?

Thanks!
 
Old 11-29-2005, 10:09 PM   #2
juanbobo
Member
 
Registered: Mar 2005
Location: Chicago
Distribution: Gentoo AMD64
Posts: 365

Rep: Reputation: 30
I don't think there are equivalent functions, but you can use the exec() function to run them:

http://us2.php.net/manual/en/function.exec.php
 
Old 11-29-2005, 10:16 PM   #3
whysyn
Member
 
Registered: Jun 2003
Location: Cleveburg, OH
Distribution: mostly Fedora
Posts: 154

Original Poster
Rep: Reputation: 30
I saw that and thought of that... will php allow me to get the exit status ($?) from the shell?

Thanks!
 
Old 11-29-2005, 10:27 PM   #4
juanbobo
Member
 
Registered: Mar 2005
Location: Chicago
Distribution: Gentoo AMD64
Posts: 365

Rep: Reputation: 30
Yeah, see return_var in the link, if you set it it will contain the return status.
 
Old 11-29-2005, 10:29 PM   #5
whysyn
Member
 
Registered: Jun 2003
Location: Cleveburg, OH
Distribution: mostly Fedora
Posts: 154

Original Poster
Rep: Reputation: 30
Duh...

Thanks! I just completely missed the obvious.

Last edited by whysyn; 11-29-2005 at 10:31 PM.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
usermod, beyond passwd & shadow Hans Zilles Linux - General 0 11-26-2005 05:29 PM
Login Process & Security of /etc/passwd and /etc/shadow arut Solaris / OpenSolaris 3 12-27-2004 01:13 PM
php & shadow passwords rblampain Linux - Security 7 12-17-2004 10:55 PM
Remove? /etc/shadow- & /etc/passwd- lcat Linux - Security 2 08-22-2004 10:26 AM
/etc/passwd or /etc/shadow? tiger7007 Linux - Security 2 03-21-2004 04:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:36 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