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 read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
scorp123
Level 8
Level 8
Posts: 2272
Joined: Sat Dec 02, 2006 4:19 pm
Location: Switzerland

Re: how do i login to root?

Post by scorp123 »

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
scorp123
Level 8
Level 8
Posts: 2272
Joined: Sat Dec 02, 2006 4:19 pm
Location: Switzerland

Re: how do i login to root?

Post by scorp123 »

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
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?

Post by Fragadelic »

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.
scorp123
Level 8
Level 8
Posts: 2272
Joined: Sat Dec 02, 2006 4:19 pm
Location: Switzerland

Re: how do i login to root?

Post by scorp123 »

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:

Post by Fragadelic »

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.
Locked

Return to “Other topics”