Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am trying to use php to allow my users to change their password through my website. They can change it in my database but not on the secure directory that the website files are stored in. The host server has disabled exec(), system(), and passthru() "for security reasons". Is there some other way I can send a passwd command to the shell so that when a user changes his password it is changed both in the database and on the server?
The host server has disabled exec(), system(), and passthru() "for security reasons". Is there some other way I can send a passwd command to the shell
If it's disabled for security reasons and you want to force it, then doesn't that constitute deliberately weakening security? How about indirect changes? Say you include a database field "has_changed" which serves as a flag that gets set when a user changes his pass. You add a non-root background process that at intervals queries the database for the "has_changed" flag, logs what its doing, extracts the username and pass to a temp file if the username is validated and known and resets the field. Then add a more privileged process that logs what its doing, reads the temp file, checks the username, validates the pass for the usual suspects, backups the old pass and then changes it. Now PHP makes crappy programming easy to do so this relies on a) nobody coming up with a qualitatively safer alternative, b) good security posture of the box and c) you being a responsable PHP programmer who *knows* and acts on A Guide to Building Secure Web Applications.
Great idea! I'll have to check on how privileged a process I can run. Also, being a newbie to php (I just picked it up from a book) I've never heard of A Guide to Building Secure Web Applications. But I'll check it out. Thanks!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.