They all do the same, logging into root but it doesn't make sense to me because while su root requires root password, sudo -s and sudo su requires only user password. I know the difference between sudo and su but it's strange to me that I can access root with primary user password...
18626
I already read it from manual but I can't see difference..  su - change user ID or become superuser  sudo -s [command]   The -s (shell) option runs the shell specified by the SHELL environment variable if it is set or the shell as specified in passwd(5).  If a                    command is specified, it is passed to the shell for execution.  Otherwise, an interactive shell is executed.  sudo -i disappear description in manual
57850
I am sharing my personal Ubuntu PC with one of my colleagues.   I created another user with a different password (he knows of course) and added it to the sudoer list.   Given that there are two sudo users in a single Ubuntu system:   Are the private files (specified by owners and permissions) of any of these users still private?  Can I modify my colleague's files via sudo command, even sudo su, or vice versa?
5981
On one particular machine I often need to run sudo commands every now and then. I am fine with entering password on sudo in most of the cases.  However there are three sudo commands I want to run without entering password:   sudo reboot sudo shutdown -r now sudo shutdown -P now   How can I exclude these commands from password protection to sudo?
74123
Whenever I issue command sudo apt-get install foo it does not ask for password. is it because of user groups?  How to make it prompt for password?  Edit: My sudoers file   apple@Ascension:~$ sudo cat /etc/sudoers # # This file MUST be edited with the 'visudo' command as root. # # Please consider adding local content in /etc/sudoers.d/ instead of # directly modifying this file. # # See the man page for details on how to write a sudoers file. # Defaults    env_reset  # Host alias specification  # User alias specification  # Cmnd alias specification  # User privilege specification root    ALL=(ALL:ALL) ALL  # Members of the admin group may gain root privileges %admin ALL=(ALL) ALL  # Allow members of group sudo to execute any command %sudo   ALL=(ALL:ALL) ALL  #includedir /etc/sudoers.d ALL ALL=(ALL) NOPASSWD:ALL ALL ALL=(ALL) NOPASSWD:ALL ALL ALL=(ALL) NOPASSWD:ALL
67372
Why  do we use sudo to perform a terminal command as an administrative? Why isn't it  admin or something else? Is there a reason for sudo?
123724
I have done some research about this on Google, but the results were cloudy. Why is the / sign used to denote the root directory. Are there any solid reasons behind it?
78799
I find that if I execute something using sudo that then if I execute something else soon after also using sudo, that it does not prompt me for my password, and although this can be inconvenient in some situations, it is a security risk in others, and a hassle to keep on coming back and executing the command to make it prompt your for the password on the next go. So I was wondering if and how I could get it to prompt me every time, or for it to at least only remember my password for a very short amount of time?
49700
It's very weird that after switching to zsh from bash, I can't access root.  I normally use 'su' to login as root after I login as a normal user (username is normalusername) with less privileges. And it was always nice. But after switching root shell from bash to zsh, when I try to login via su, I got:  normalusername@(none):~$ su Password: (enter the correct password) Cannot execute zsh: No such file or directory   When I access root directly via ssh from my Mac, I got:  localhost:~ myname$ ssh -lroot 106.186.120.20 root@106.186.120.20's password: (enter the correct/incorrect password) Permission denied, please try again.   No matter whether I entered the correct password, it comes again and again.  So I intentionally entered a wrong password with "su" from a normal user, I got:  normalusername@(none):~$ su Password: (entered a wrong password and pressed enter) (pressed enter) su: Authentication failure   After entering the incorrect password I didn't see anything, I typed enter twice and then got the su: Authentication failure result.  I tried for many times and the conclusion is:   If I enter the correct password, it will tell me that "Cannot execute zsh: No such file or directory" If I enter the incorrect password, it will not showing up anything until I hit enter for 2-6 times.   It seems to be an indication that I didn't just forget the "correct password". But how can I access root anyway?  The entry in /etc/passwd is  root:x:0:0:root:/root:zsh
13810
Using ps -aux or top, I can list other users running processes, but I'm neither running as root nor making use of sudo, why?
96957
When I set up Ubuntu system for the first time, and create first user, will that user be root? I would like to use sudo user, so how to add it if first user is root? Also is it possible to create sudo user withoute root user?
2104
I've often come across posts on forums or other websites where you see people joking in such a manner about running/logging in as root as if it's something awful and everyone ought to know about it. However, there isn't much that a search reveals on the matter.   It may be widely known to Linux experts, but I really don't know why. I remember always running as root when I first tried Linux years ago (Redhat and Mandrake) and don't remember running into any problems because of that.   There are actually some distros that have a bright red background with alert signs all over it as wallpaper for the root user (SuSe?). I still use the "Administrator" account for regular use on my Windows installation and haven't ever run into any problems there either.
41141
I messed around with the sudoers file without really knowing what I was doing using   Assume I did everything that was in the top answer along with editing it with vim and not visudo. How do I fix this?  I'm running Xubuntu 12.04, and I didn't set a root password.
95185
A sample script can be as below:  #!/bin/bash sudo su ls /root   When using ./test.sh as the normal user, instead run ls as super user and exit, it switches to root; and when I logout, it executes ls /root as the normal user.  Can anybody tell me about the mechanism about it?
59761
Websites tell me to use sudo when I have no password, usually tell me one of two things.   It is bad security Or use 'sudo visudo' and the %admin ALL=(ALL) NOPASSWD: ALL line   I would like to not have a password on anything despite the security risks.  Going with option 2, I'm trying to avoid getting prompted to enter a password at all on my account.  So the problem with option 2, is that sudo is still prompting for a password that does not exist. So I can not use sudo visudo in order to remove the need to enter a password for sudo, because it prompts for a password.
6272
I've read  and am interested in this line:     You should never use normal sudo to start graphical applications as Root.   Why? What is the difference? Please provide a simple explanation, as I'm just a normal desktop user.
6147
I want sudo to behave like this, for all users:   If the user currently has a non-empty password, prompt for the password. If the user currently has an empty password, either prompt for the password and accept the empty string, or don't prompt at all and permit.   Is this possible? Right now, I have (1) but this is what happens for a user with an empty password:  $ sudo echo Sorry, try again. Sorry, try again. Sorry, try again. sudo: 3 incorrect password attempts   Alternatively, I can switch off password checking per-user, but that's not what I want, because the user might set a password later, and then sudo should prompt for it.
84960
I'm uing ubuntu 12.04 desktop. I have 3 users: user1(administrator), user2(standard) and guest. I wanted to disable user1 and enable user2 which auto logs on with no password but after I did that I can't login to user1 and user2 accounts except the guest session user. I'm striped off every administrative privileges. I don't know which options are available to me and how do I enable root or user which is an administrator?