Linux root user, me.

It's your computer, so the ubermost user, the one with the ability to do absolutely anything to any file on your machine, should be under your control, and not that of any passing stranger. If you agree, and you have a default *buntu (read: Kubuntu, Ubuntu, Xubuntu, etc.) install, you'll want this next tip..

create a root password..

In truth, I have no idea what sort of crazy limbo state the root user exists in before you give him a password; but I do know that any Tom Dick and Henry can reboot your box into recovery mode and drop into a root shell with the simple yet elegant hack that is pressing the Enter key. Clearly this is not something you want, so do..

sudo passwd root

Enter your regular admin login password, and then the new root password x2. All done.

A temporary root shell..

While I'm on the subject of being root, you have probably noticed that all the best commands, the really juicy stuff needs to be done as root. This is for a reason, of course, and with security in mind, the "sudo" construct is a handy way to get root for a single command. But it quickly gets tedious if you need to perform more than a couple of commands. The solution..

sudo -i

This basically opens up a new sudo shell, where you can perform as many commands as you like, as root, without having to prepend every one of them with "sudo". Remember to log out of this root shell if leaving your workstation unattended (the usual Ctrl+D is fine).

mc in da house..

And because I like to do stuff in threes, here's another cool way to get a root shell in your Linux box; use mc. If you don't have mc installed, do..

sudo aptitude install -y mc

Note the use of the "-y" switch, so you don't get a chance to change your mind about this; mc rocksl And no *NIX machine is complete without a copy. Once aptitude is done (about 1.2 seconds later) do..

sudo mc

and behold!

Okay, IMMEDIATELY BEFORE YOU DO ANYTHING ELSE DO..

F9 (activate menu)
Down Arrow (drop it down - redundant, but we're about to fix that)
Left Arrow (to get to the configuration menu)
Enter

Now you are in the prefs, enable..

Panel options..
 Drop down menus
Pause after run..
 Always.
Other Options..
 Use Internal Edit
 Lynx-like motion

SAVE


Back in mc, save your setup..

F9 (now the menu drops down automatically!)
Down
Left
Up
Enter
(if you are on the "Save Setup" item!)

Okay, now you have the meanest, greenest, handiest file manager on Earth. You will note that below the nice two-pane display, is a command-line. You did "sudo mc", so that command-line has got root. And it gets better..

Ctrl+O

Opens a root shell. You can use Ctrl+O to flip back and forth between the two (regular mc and the root shell). And of course, the root shell follows mc's navigations, so you can use your Lynx-like motion (right and left arrows take you in and out of folders - simple, but devastatingly effective!) to get to any folder, enywhere, and then Ctrl-O to flip to a full-window root shell in that very directory. Pretty cool.

You got root root root!

;o)
Cor

ps. In case you didn't know; you get to your "shell" via some kind of terminal emulator. In Kubuntu, or any KDE, that's usually "Konsole", which is probably the best terminal emulator I've used. You can open a tty console with Ctrl+Alt+1(-6), too, and login as root; though these days there's rarely a need. And of course, you can get to a root shell via recovery mode, right at the start of bootup. And unless you set a password on the root account, so can anyone else!


 ©  2024 « corz.org » 24.12.22  

Welcome to corz.org!

I'm always messing around with the back-end.. See a bug? Wait a minute and try again. Still see a bug? Mail Me!