Page 1 of 1

Re: how do i login to root?

Posted: Mon Feb 26, 2007 7:32 am
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

Re: how do i login to root?

Posted: Mon Feb 26, 2007 9:10 am
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 ... :?

Re: how do i login to root?

Posted: Mon Feb 26, 2007 4:49 pm
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.

Re: how do i login to root?

Posted: Tue Feb 27, 2007 7:32 am
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:

Posted: Tue Feb 27, 2007 10:20 am
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.