Root: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
>Outleradam
No edit summary
(Fix dead-end page and update code snippets to use syntaxhighlight tags)
 
(9 intermediate revisions by 4 users not shown)
Line 1: Line 1:
Root access is used for administrative functions on a Linux/Unix (aka *NIX, or POSIX) based system. Just as the root of the filesystem is the place where all other folders are mounted, the term root is derived from the fact that all other accounts stem from this account
Root access is used for administrative functions on a POSIX (a/k/a Unix or [[Linux]]) based system. Just as the root of the filesystem is the place where all other folders are mounted, the term root is derived from the fact that all other accounts stem from this account.


== Gaining root access ==
When using the access to the root account, you have full control over the system. It is a standard practice to limit this access as it is not necessary to have control over the entire system for most tasks. However, when root access is needed on a POSIX system, the user who elevates his/her permissions is generally asked for a password for authentication purposes.


== How to gain root access ==
=== sudo ===
When using the access to the root account, you have full control over the system. It is a standard practice to limit this access as it is not necessary to have control over the entire system for most tasks.  However, when root access is needed on a *NIX system, the user who elevates his/her permissions is generally asked for a password for authentication purposes. 
 
==== Sudo ====
To gain temporary root access type sudo into your terminal:
To gain temporary root access type sudo into your terminal:
sudo (your command here)
:<syntaxhighlight lang="sh">sudo <your command here></syntaxhighlight>


==== Persistant Sudo ====
=== Persistent sudo ===
To gain root shell without setting a permanent password:
To gain root shell without setting a permanent password:
sudo bash
:<syntaxhighlight lang="sh">sudo "${SHELL}"</syntaxhighlight>


==== Switching to the Root Account ====
=== Switching to the root account ===
To switch to the root account without authenticating with root credentials:
To switch to the root account without authenticating with root credentials:
sudo su
:<syntaxhighlight lang="sh">sudo su</syntaxhighlight>


==== Enabling the Root Account login authentication====
=== Enabling root account login ===
Enabling the root account is not recommended. This places a major security hole in your system when connected to a network. Malicious users will generally attempt to gain root access as a first attempt to log in. Do not set the password as "root"
Enabling the root account is not recommended. This places a major security hole in your system when connected to a network. Malicious users will generally attempt to gain root access as a first attempt to log in. Do not set the password as "root"


To gain root access type the following into your terminal:
To gain root access type the following into your terminal:
sudo passwd root
:<syntaxhighlight lang="sh">sudo passwd root</syntaxhighlight>
* select a password  
* Select a password  
Your root is now enabled. You can now log in to Kodi as user "root" with the password you selected.
 
== Security risks ==
{{Warning|Important contextual information below; please read.}}
A lot of people would say that security on their home network is not important, but we believe it would serve you well to heed this. When authenticated as the root user on a system, one has access to all account credentials which stem from the root user. If a user such as Kodi has access to your file shares, then the root user can gain access to those file shares. It is important to note that the root account bypasses security measures that are put in place to keep your information secure, including (but not limited to) such information as saved credit card and bank account information. The same people who write viruses would like to gain access to the root account on your Kodi computer no less so than they desire it on all computers.


== A friendly word on Security Risks ==
Alot of people would say that security on their home network is not important but I would like you to read this.  When authenticated as the root user on a system, you have access to all account credentials which stem from the root user.  If A user such as XBMC has access to your file shares, then the root user can gain access to those file shares.  It is important to note that the root account bypasses security measures that are put in place to keep your information secure such as saved credit card and bank account information.  The same people who write viruses would like to gain access to the root account on your XBMC computer.


Your root is now enabled.  You can now log in to XBMC as Root with the password you selected.
[[Category:Linux]]

Latest revision as of 01:05, 23 September 2021

Root access is used for administrative functions on a POSIX (a/k/a Unix or Linux) based system. Just as the root of the filesystem is the place where all other folders are mounted, the term root is derived from the fact that all other accounts stem from this account.

Gaining root access

When using the access to the root account, you have full control over the system. It is a standard practice to limit this access as it is not necessary to have control over the entire system for most tasks. However, when root access is needed on a POSIX system, the user who elevates his/her permissions is generally asked for a password for authentication purposes.

sudo

To gain temporary root access type sudo into your terminal:

sudo <your command here>

Persistent sudo

To gain root shell without setting a permanent password:

sudo "${SHELL}"

Switching to the root account

To switch to the root account without authenticating with root credentials:

sudo su

Enabling root account login

Enabling the root account is not recommended. This places a major security hole in your system when connected to a network. Malicious users will generally attempt to gain root access as a first attempt to log in. Do not set the password as "root"

To gain root access type the following into your terminal:

sudo passwd root
  • Select a password

Your root is now enabled. You can now log in to Kodi as user "root" with the password you selected.

Security risks

Stop hand.png Important contextual information below; please read.

A lot of people would say that security on their home network is not important, but we believe it would serve you well to heed this. When authenticated as the root user on a system, one has access to all account credentials which stem from the root user. If a user such as Kodi has access to your file shares, then the root user can gain access to those file shares. It is important to note that the root account bypasses security measures that are put in place to keep your information secure, including (but not limited to) such information as saved credit card and bank account information. The same people who write viruses would like to gain access to the root account on your Kodi computer no less so than they desire it on all computers.