typing root password in terminal

D

Dave67

Guest
For some reason In Ubuntu 14.04 terminal when I type su press and than type my password I cannot the shell is not taking it and will not take my PW. what is the sign when you are already in root in the shell?
 


Try "sudo su" (without quotes) instead. The prompt should change from a $ to a # symbol when you are root. It's usually better to use "sudo" on whatever command it is that you want to use instead of actually becoming root. Typing "exit" in the terminal will leave root and restore the normal user session.
 
Danger Will Robinson!

By default Ubuntu does not use the "Root" system. It uses sudo instead. There are different explanations for what it means, but commonly it stands for superuser do.

When you use sudo it temporarily gives you "Root" rights for 15 minutes. The prompt will not change. It will remain the same.

Try it now e.g. with the command: sudo apt-get update

Have a look starting here: http://ubuntuguide.org/wiki/Ubuntu:Trusty#Introduction

There are times when gksudo is recommended instead of sudo, generally when you are opening a graphical application. An alternative explanation to the ubuntuguide is here:
http://www.psychocats.net/ubuntu/graphicalsudo

Yes, as atanere says, you can use sudo su, but it is pushing Ubuntu to a place it does not normally go. If you can avoid it...don't. Mostly there should be no need to change from sudo.
 
When you use sudo it temporarily gives you "Root" rights for 15 minutes. The prompt will not change. It will remain the same.

In my experience, you don't get root rights, but it the shell does remember your password for that period of time. So you still have to sudo before issuing a root command (unless you do sudo su or sudo -s, which puts you into root mode, and the prompt does change). Keep sudo-ing, and the password is retained, I believe. If you don't keep sudo-ing, the password will be forgotten.
 
Maybe something you will forget to type sudo before your command ,then ' sudo !! ' can help you solve the embrassing thing ! It means that redo the previous command with sudo !
 
If the prompt symbol doesn't change to # when you think you switched to root user, you can check if you are running as root with a command "id -a"
 

Members online


Top