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 know what su does and what is used for and also what sudo does and what it is used for. But i am confused between
su - and sudo su -,
is there any difference in the two commands and if yes then what is the difference. When i run su - it will ask me for the root password and i will login in as root.
In the second case "sudo su -" ,ideally it should first ask for the password of the currently logged in user for user and then it should ask for the password for the root user. However what is happening is that its not asking for root password.
So i am confused why password for root is not being prompted for. And if this is the case then i assume it is a security issue as anybody with sudo access to su command can switch to root and can do anything he/she wants.
Hello, If you type "su -" in the command-line, you have to know the root password then you can do things as root from the command-line. If you type "sudo su -" in the command-line, you will have to be in sudoers and you can use your own password without using root's password.
Different ways, different user requirements but same results.
if you are going to configure "sudo"
then why even bother with adding the redundant su - afterword
if you only have one or two users then there is no real need to open the can of worms that " sudo" is
su = root user BUT with the NORMAL user $PATH
su - = root with root $PATH and IN the root $HOME folder
I know the difference between su and su - , however my doubt is what is difference between issuing "su - " and "sudo su -" and why it does not prompt for root password while i issue the second command.
You are double-posting. You are posting 2 times. But, I answered you on the first post.
I am sorry for posting twice, that was posted mistakely twice. However i think you did not get my question correctly because i was not asking about the su and sudo difference and i know for simply su you have to know the password of the user you are switching to and for sudo you have to provide yuor own password to validate that you are a valid sudoer.
My question is regarding specifically to su - and sudo su - and why no root password is being asked in second case and what is the difference between two commands.