Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I have a question for anyone out there who might be familiar with the command line.
I am designing a web application (in PHP) which will get a user's name and password, then change to a new password that the user requests.
However, I've run into a few small snags.
At first, I was going to just attempt to open an ssh session from php using the shell_exec() command (which lets a command line program to be run) and see if the session opens properly. But, as many will be quick to realize, there's no actual way to pass the user's password in a command line statement with ssh.
Then, my next thought was to log in to the local machine through ssh as root, and have a shell script automatically run that would confirm the user really gave me the right password. (I can log into root using a pub/priv key setup) However, I can't seem to find a method for checking whether or not the user gave me the correct password, seems like the applications passwd and chpasswd only let me change the password.
I looked into writing a script that would use "expect", but I don't have access to Tcl on this system, so expect isn't a possibilty.
I was just wandering how a program that is running as nobody is going to read /etc/shadow. It would need to use something like PAM, right? There is a binary that does that. It is somewhere in /usr/local/bin or /usr/bin. It's the same route that screensaver take to verify the passwords.
PAM is a good thought, but I managed to come up with a way for 'nobody' to ssh to localhost through a pub/priv key scheme, then run the chpasswd command from there. It's made so that only the php process can have access to the private key.