super user

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help

super user

Postby flawless on Sat May 01, 2010 12:45 pm

how do i run terminal as the super user?

i know you can type sudo before the command. but i want to know how i can run as the super user so i dont have to type sudo before every command.

thanx in advance
flawless
Level 1
Level 1
 
Posts: 34
Joined: Fri Jun 13, 2008 7:44 am
Location: uk, manchester

Linux Mint is funded by ads and donations.
 

Re: super user

Postby rich_roast on Sat May 01, 2010 12:54 pm

There are a variety of ways to achieve this but for all that is holy please make sure you understand the risks of running around with root permissions, even if it's only running terminal as root.

AFAIK sudo should be remembering that you've run the command recently and further sudo operations for about five minutes or some other timeout should not pester you for your password. I don't know how to increase the timeout but it might be worth investigating this as a solution.

If you, like me, open a directory as root in your file explorer program then opening a terminal using the right click menu should open the terminal as root.

There is also the command

Code: Select all
su


which substitutes root for your user, meaning that all commands you enter will be as root thereafter until you exit root's account with

Code: Select all
exit


which you ought to do before closing the terminal window, as su runs as a process (if you're running Gnome's terminal you'll get a warning if you try to close the terminal window without exiting su first to this effect).
User avatar
rich_roast
Level 6
Level 6
 
Posts: 1136
Joined: Sat Sep 05, 2009 4:37 pm

Re: super user

Postby flawless on Sat May 01, 2010 1:00 pm

thanx v.much i have been typing all sorts to get it to run as super user i forgot the command because i went back to using windows as i use it to make my music.

just another quick question is there any way of getting reason 4.0 to work in linux?
flawless
Level 1
Level 1
 
Posts: 34
Joined: Fri Jun 13, 2008 7:44 am
Location: uk, manchester

Re: super user

Postby Aging Technogeek on Sat May 01, 2010 1:23 pm

Image

Registered Linux User 483387
User avatar
Aging Technogeek
Level 13
Level 13
 
Posts: 4604
Joined: Sun Jan 11, 2009 9:54 am
Location: Right about here

Re: super user

Postby guigum on Sat May 07, 2011 10:47 pm

The easiest way I found is to use this command

'sudo passwd root'

You may or may not be prompted for your current login, as usual, then you will be prompted to set a new passwd and confirm this passwd. This is the root or 'su' password. 'su' exists, they just don't give us the passwd..

(ie) sudo passwd root
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully

su will work with this new password, at least it did for me. Mint 9
guigum
Level 1
Level 1
 
Posts: 1
Joined: Sat May 07, 2011 9:41 pm

Re: super user

Postby trollboy on Sun May 08, 2011 10:50 am

The simplest way is to to run the command
Code: Select all
sudo -i
which give you a root terminal until you type the command
Code: Select all
exit
or close the terminal.
Gnome is dead. Long live XFCE
User avatar
trollboy
Level 2
Level 2
 
Posts: 92
Joined: Tue Mar 01, 2011 10:51 am

Re: super user

Postby AlbertP on Sun May 08, 2011 10:58 am

Use one of these things:
Code: Select all
sudo -i
sudo su
su

They should all work, without the need to set a password: they want your own password if there's no root password set (even su does this).
I prefer su as it is shorter to type.

Edit. If you are running a distro which configures a root password during install, sudo -i and sudo su usually do not work, and you need to do su.
Last edited by AlbertP on Mon May 09, 2011 5:18 am, edited 1 time in total.
Registered Linux User #528502
Image
Feel free to correct me if I'm trying to write in Spanish, French or German.
AlbertP
Level 16
Level 16
 
Posts: 6522
Joined: Sun Jan 30, 2011 12:38 pm
Location: The Netherlands

Re: super user

Postby trollboy on Sun May 08, 2011 11:45 am

I never even thought of trying su on its own. Sweet.
Gnome is dead. Long live XFCE
User avatar
trollboy
Level 2
Level 2
 
Posts: 92
Joined: Tue Mar 01, 2011 10:51 am

Re: super user

Postby StanTheMan on Sun May 08, 2011 4:24 pm

The sudo command basiclly gives you Terminal root privileges , but using only ONE password for sudo and First User.
With Debian you crreate two passwords at install , one for Root and one for User.
The above method described by guigum sets up the Root account after install to work like Debian. You will have two passwords, but you will not have to run the sudo command at every line in a long Terminal process.
StanTheMan
Level 5
Level 5
 
Posts: 578
Joined: Fri Feb 13, 2009 7:07 pm

Re: super user

Postby linuxviolin on Sun May 08, 2011 4:41 pm

rich_roast wrote:until you exit root's account with

Code: Select all
exit

Or just with the shortcut Ctrl+d :wink:
K.I.S.S. ===> "Keep It Simple, Stupid"
"Simplicity is the ultimate sophistication." (Leonardo da Vinci)
"Everything should be made as simple as possible, but no simpler." (Albert Einstein)
User avatar
linuxviolin
Level 8
Level 8
 
Posts: 2055
Joined: Tue Feb 27, 2007 6:55 pm
Location: France

Re: super user

Postby trollboy on Sun May 08, 2011 6:00 pm

linuxviolin wrote:
rich_roast wrote:until you exit root's account with

Code: Select all
exit

Or just with the shortcut Ctrl+d :wink:


Or Alt + F4 but to be fair that doesn't work in a tty either :)
Gnome is dead. Long live XFCE
User avatar
trollboy
Level 2
Level 2
 
Posts: 92
Joined: Tue Mar 01, 2011 10:51 am

Linux Mint is funded by ads and donations.
 

Return to Newbie Questions

Who is online

Users browsing this forum: Bing [Bot], octathlon, wwfwng and 37 guests