LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   Logging in as non-privileged user (https://www.linuxquestions.org/questions/linux-security-4/logging-in-as-non-privileged-user-235594/)

TastyWheat 09-26-2004 10:29 PM

Logging in as non-privileged user
 
I know it isn't possible to just login as one, but is there a simple way to switch a non-privileged user to a privileged user? I want to be able to take an account like httpd or mysql or nobody and be able to login under that account. Don't tell me that it's a bad idea or whatever, this is somewhat hypothetical and I normally wouldn't do this. I want this to be done with making minimal changes to the passwd and shadow files. So setting the default shell, home directory, and password should be avoided if possible.

CroMagnon 09-27-2004 12:39 AM

The reason you can't log in as one of those users is that they don't have a password set (well, they have an invalid password field), so you will have to set a password if you want to be able to log in at a login prompt. The other way you can impersonate a user like this is just to su from root.

TastyWheat 09-27-2004 01:58 AM

In my distribution of linux (Red Hat 9) the only way you can login as a certain user is if thier login shell is NOT set to /sbin/nologin. Even if it is left blank then you can login or su to that user.


All times are GMT -5. The time now is 01:05 AM.