To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here
PHPBuilder.com  
 

 

Go Back   PHPBuilder.com > Misc Help > Linux/Unix Help

Linux/Unix Help Help with server-side Linux and Unix issues

Reply
 
Thread Tools Rate Thread Display Modes
Old 09-11-2002, 04:22 AM   #1
nimrodc
Junior Member
 
Join Date: Sep 2002
Posts: 1
security problem

hi
how can i run "adduser" from html page...
i have redhat 7.3 .. and the site is on the apache server
i'm useing php for server side script .. the function is
"passthru ('adduser test');" it's work ok from the php interupter
the error is "can't lock passwrord file" ..
i'm using .htaccess file for basic authentication..
but the problem is that the authenticat user is not a system user
it only have rights in the site folder and the apache is runing on the apache user ....
how can i overtake this problem....
nimrodc is offline   Reply With Quote
Old 09-11-2002, 10:44 AM   #2
dannys
Senior Member
 
Join Date: Mar 2001
Posts: 636
Apache is running as an unpriveliged user - it doesn't have the authority to add users.

You might try altering the permisssions on the passwd file so that the user apache is running as will have permission but this is obviously more than a little insecure.
dannys is offline   Reply With Quote
Old 09-18-2002, 08:46 AM   #3
overlordhu
Junior Member
 
Join Date: Dec 2001
Posts: 12
Hi,


Not too much of security, but I think I can solve your problem. Have you ever heard of the SUDO package ? That can be configured to give permissions on executing commands as root.
Note that, this can be a security hole on your system.


Best,

Paul
overlordhu is offline   Reply With Quote
Old 09-18-2002, 10:17 AM   #4
nashirak
Senior Member
 
Join Date: Jul 2001
Posts: 305
I think the traditional method is running root sensitive unix commands from a cron script. Have the cron script read from a file or something (this contains usernames). Then read the file and create users off of that. This method is an indirect way to get "root" privelges. Do not give you web users this priveleges.

Hope this helps!
nashirak is offline   Reply With Quote
Old 09-19-2002, 10:55 AM   #5
Frag
Member
 
Join Date: Sep 2002
Location: Dallas
Posts: 98
I whole heartly agree with nashirak. To allow someone to create a user from a webpage is just asking for trouble. To have that ability is just plain crazy. You really need to add a notification to it if your going to do such. (even if your the only one that uses it) That way if someone else gets ahold of it you will still be notified of an account that was created.

Don't plague yourself like Microsoft did.

"Our products aren't engineered for security" -- Brian Valentine, senior vice-president in charge of Microsoft's Windows development

http://www.cw360.com/bin/bladerunner...9&CARTI=115571

Frag
__________________
Info Inflow Overload, Knowledge Blackhole Imminent
Frag is offline   Reply With Quote
Old 09-19-2002, 11:52 AM   #6
dotwebbie
Expert at something . . .
 
Join Date: Aug 2002
Posts: 287
lol! I haven't heard that one before. At any rate, I might as well agree with what was said here.
dotwebbie is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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
Forum Jump


All times are GMT -4. The time now is 05:47 PM.






Acceptable Use Policy

internet.comMediabistrojusttechjobs.comGraphics.com

WebMediaBrands Corporate Info


Advertise | Newsletters | Feedback | Submit News

Legal Notices | Licensing | Permissions | Privacy Policy


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.