Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
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 have Mandrake Linux 8.2, I'm wondering if it's possible to switch between users without compeletely logging out (like win xp).... I just want to run a program and I dont have root permissions. I'm using the console to run the program, is it possible to run it as root?
If you want to run a program as root in the console window then this is what you got to do:
type: su
This will prompt you to enter the root password. Once you entered the correct pass, and hit enter, you are root in the console. SO run your program now.
you can also use su to login as maybe another user..
su user1
most use su to just login as root though. and another tip is to give this command to get full root rights and path's:
umm tnx, but I really dont get what su - does, what do you mean to get full root paths?
Umm also why is it bad to log in as root? because it warned me when I did so, it said that I can mess up with system. Why would that possibly happen?
I think (really, because I really don't know) that SU doesn't stand for SUper User like I had always thought, instead I think it stands for Switch User. That is why the su - is the command rather than simply su. And since you can do a su - <user> to change to another user. Cool, I hope that helps?
I think su stands for substitute user. Anyways the - option simulates a full login by running files like .profile and .bashrc. And it sets the current working directory to the users home directory. Usually in those .profile and .bashrc files certain environment variables get set specific to a certain user. Some of these are sometimes needed to run a program.
Yep, I just went to the man pages on here, checked out su and you are absolutely right.
"su - run a shell with substitute user and group IDs"
straight outta the man.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.