Change between users

a fast question
I am root in a system,
and i want to "change" into another user, who dont have su permissions.
how Do i do that ?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

To change user issue the following command

su <username>


su damian

this would put you into the damian account
MaRiOsGRAuthor Commented:
Its not working
i mean
I have 2 users

user1 and user2

user1 can login and write su and then be root user
then while Im root im typing su user2 but nothing happens.
su <username> should work.

[root@localhost ~]# id
uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel)
[root@localhost ~]# su damian
[damian@localhost root]$ id
uid=500(damian) gid=500(damian) groups=4(adm),500(damian)
[damian@localhost root]$

When your root and type su username you because that use do the following above but change damian to user2
also make sure you issue the id commands and paste the results back how I have above.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Your Guide to Achieving IT Business Success

The IT Service Excellence Tool Kit has best practices to keep your clients happy and business booming. Inside, you’ll find everything you need to increase client satisfaction and retention, become more competitive, and increase your overall success.

MaRiOsGRAuthor Commented:
i finaly found the reason why su dont work

i opened the passwd file and I saw : psaadm:x:502:500:Plesk user:/usr/local/psa/admin:/bin/false
so /bin/false is the reason..
I was temped to ask about the /etc/passwd to see if the user had a shell access :) anways atleast you know the problem
Do I get the points?
Follow this if you can. Let me know. It's pretty simple if you use su properly.
su stands for Switch Users, not SuperUser.

user1@box$ su
Password: <root password>

root@box# <stuff>

root@box# exit
user1@box$ su user2
Password: <user2's password>
user2@box$: <more stuff>
Tachyon he said what the problem was in the /etc/passwd the shell was /bin/false :( he aint giving the point for some reason :(
MaRiOsGRAuthor Commented:
yes the reason was finally that the user i was tryint to be is not aallowed for shell.

whatever im gonna split the points to u both.
No, the /etc/passwd thing was a symptom of not using su correctly IMO.

Whatever, I'm not after points, I just enjoy the challenge.
MaRiOsGRAuthor Commented:
But Tachyon if a user has /bin/false and its not allowed to connect to ssh,
how can I do su and be him ?

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.