Enable root login on Raspberry Pi & create MS DOS for the 21st century!

I use my Raspberry Pi like a MS-DOS computer for 21st century, so of course I want to run as root - and login that way too. It's easy:

Give root a password:

sudo passwd root

enable login as root:

sudo nano /etc/ssh/sshd_config

find (ctrl-w): #PermitRootLogin prohibit-password

make it look like

PermitRootLogin yes

then restart ssh:

sudo service ssh restart

Of course it's dangerous to run as root, but if you want to access hardware directly it's the only way to go. You might think about setting up a trashcan alternative to rm since you can get yourself into a lot of trouble with those two letters plus a typo or to.  Add this to the end of your .bashrc

alias emptyTrash='ls ~/.trashcan; du -sh ~/.trashcan; rm ~/.trashcan/* -rf'
del () { du -sh $*; mv $* ~/.trashcan/; }
[[ $- == *i* ]] && du -sh ~/.trashcan

and then in your home folder, do this once:

mkdir .trahscan

also why not autologin as root on the console?

First, use raspi-config to enable autologin for the pi user, then fix it to use root instead:

 nano /etc/systemd/system/getty@tty1.service.d/autologin.conf

give yourself a line line this:

ExecStart=-/sbin/agetty --autologin root --noclear %I $TERM

Comments

Email me

Name

Email *

Message *

Popular posts from this blog

Panasonic TH-42PX75U Plasma TV review: input lag and upscaling tested using the piLagTesterPRO

piLagTester PRO order page

A $5 TV Input Lag tester using a Raspberry Pi Zero