Difference between revisions of "Root"

From Official Kodi Wiki
Jump to navigation Jump to search
m (Bot: Automated text replacement (- XBMC + Kodi ))
(Fix dead-end page and update code snippets to use syntaxhighlight tags)
 
Line 1: Line 1:
Root access is used for administrative functions on a POSIX (aka 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,
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 ==
== How to gain 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.  
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 ====
=== 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.
Your root is now enabled. You can now log in to Kodi as user "root" with the password you selected.


== A friendly word on Security Risks ==
== Security risks ==
A lot 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 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 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 Kodi computer.
{{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.
 


[[Category:Linux]]
[[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.

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

1.1 sudo

To gain temporary root access type sudo into your terminal:

sudo <your command here>

1.2 Persistent sudo

To gain root shell without setting a permanent password:

sudo "${SHELL}"

1.3 Switching to the root account

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

sudo su

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

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