how do i login to root?

Questions about other topics - please check if your question fits better in another category before posting here
Forum rules
Before you post please read how to get help
User avatar
jett
Level 2
Level 2
Posts: 65
Joined: Tue Nov 28, 2006 8:43 pm

how do i login to root?

Postby jett » Mon Feb 26, 2007 7:12 am

i tried doing this at the command ling
su
then i typed my password
but it said
su: Authentication failure
Sorry.
why is this?
does ubuntu have a default password?
is this not the password i made in the beginning?

koldrakan
Level 1
Level 1
Posts: 2
Joined: Mon Feb 26, 2007 5:38 am

Postby koldrakan » Mon Feb 26, 2007 7:16 am

you have set a root-pass and a pass for your user, you have to type the root-pass

User avatar
scorp123
Level 8
Level 8
Posts: 2264
Joined: Sat Dec 02, 2006 4:19 pm
Location: Switzerland

Re: how do i login to root?

Postby scorp123 » Mon Feb 26, 2007 7:32 am

jett wrote:i tried doing this at the command ling
su
Direct access to "root" is disabled in Ubuntu and Ubuntu-like Linux distros. You have to use "sudo", e.g.

Code: Select all

sudo command-to-be-run-as-root

User avatar
manishk
Level 3
Level 3
Posts: 179
Joined: Wed Nov 29, 2006 4:19 pm
Location: India

Re: how do i login to root?

Postby manishk » Mon Feb 26, 2007 7:44 am

Just adding to what scorp123 said...

So, instead of su you must type

Code: Select all

sudo su


then give YOUR password
"...Many people can only keep on fighting when they expect to win. I'm not like that, I always expect to lose. I fight anyway, and sometimes I win."

-Stallman

User avatar
veloct
Level 2
Level 2
Posts: 56
Joined: Thu Feb 01, 2007 8:39 am
Location: CT, USA

Postby veloct » Mon Feb 26, 2007 9:00 am

One thing you can do is also,

Code: Select all

sudo passwd


This will ask you to set a root password. You'll still use the password you set during install (user password) to open synaptic etc. because it is Ubuntu based so it will use sudo for most operations but you will be able to su in a terminal to root.

HTH

User avatar
scorp123
Level 8
Level 8
Posts: 2264
Joined: Sat Dec 02, 2006 4:19 pm
Location: Switzerland

Re: how do i login to root?

Postby scorp123 » Mon Feb 26, 2007 9:10 am

manishk wrote:

Code: Select all

sudo su
then give YOUR password
I didn't mention this possibility with purpose. :wink: Chances are that newbies will hose their systems with an open root shell ... :?

User avatar
veloct
Level 2
Level 2
Posts: 56
Joined: Thu Feb 01, 2007 8:39 am
Location: CT, USA

Postby veloct » Mon Feb 26, 2007 9:24 am

As long as we mention the consequences of such actions when we post those type of suggestions, I think it's fine. That way if they do hose their system is their fault and they can't say that they weren't told what could happen.

User avatar
Fragadelic
Level 4
Level 4
Posts: 244
Joined: Wed Nov 15, 2006 11:05 am
Location: Canada
Contact:

Re: how do i login to root?

Postby Fragadelic » Mon Feb 26, 2007 4:49 pm

scorp123 wrote:
manishk wrote:

Code: Select all

sudo su
then give YOUR password
I didn't mention this possibility with purpose. :wink: Chances are that newbies will hose their systems with an open root shell ... :?


I use sudo su all the time but then again, I've been running linux since '97 and have also been employed in the past as a systems admin.

User avatar
scorp123
Level 8
Level 8
Posts: 2264
Joined: Sat Dec 02, 2006 4:19 pm
Location: Switzerland

Re: how do i login to root?

Postby scorp123 » Tue Feb 27, 2007 7:32 am

Fragadelic wrote:I use sudo su all the time but then again, I've been running linux since '97 and have also been employed in the past as a systems admin.
Well, I wasn't talking about anyone specific when I said "chances are that newbies will hose their systems with an open root shell", it's just to make people aware that one stupid command might have drastic consequences.

When I was a noob back in 1996 I once wanted to get rid of some stupid temporary "dot" files that my home folder got filled up with. Some of my attempts were stopped with an "access denied" error, so I switched to root and entered a rather stupid command that had the words "rm", "-rf" and ".*" in them (DO NOT TRY THIS AT HOME!) ...

Quiz: What happens if you as root type in such a command as above? Right, thanks to "-rf" and ".*" it won't stay in the $HOME directory but also go upwards (".." is included in ".*" !!!) and continue its deletion orgy there .... :D

That day I learned about the values of having good working backups .... :lol: :lol: :lol:

User avatar
Fragadelic
Level 4
Level 4
Posts: 244
Joined: Wed Nov 15, 2006 11:05 am
Location: Canada
Contact:

Postby Fragadelic » Tue Feb 27, 2007 10:20 am

lol

Just for giggles, do this on a test partition without any other mounted partitions or network drives and see how far it gets:

rm -rf /

Similar results to yours except that you start at the right place first off - lol.


Return to “Other topics”

Who is online

Users browsing this forum: Yahoo [Bot] and 2 guests