1 00:00:06,559 --> 00:00:08,609 In this video I'll tell you about the root user. 2 00:00:09,609 --> 00:00:12,400 The root user is a user that always exists. 3 00:00:12,900 --> 00:00:15,580 It lives in the Linux kernel. We call that kernel space. 4 00:00:16,280 --> 00:00:22,079 And because it lives in the Linux kernel, the root user needs no permissions to do whatever the root user wants to do. 5 00:00:23,219 --> 00:00:25,280 Root has kernel level access, and permissions. 6 00:00:26,480 --> 00:00:28,769 Are not dealt with at the kernel level. 7 00:00:29,410 --> 00:00:34,429 That makes root an unlimited user account, and using this account should be avoided at all times. 8 00:00:35,630 --> 00:00:42,219 On modern distributions, the root user often. Doesn'T even have a password, which effectively disables the user. 9 00:00:42,799 --> 00:00:44,469 But you could set a password if you want. 10 00:00:45,490 --> 00:00:48,289 But don't forget, you should never login as root. 11 00:00:49,189 --> 00:00:52,905 Instead use either su, which is a poor choice in fact, 12 00:00:52,905 --> 00:00:56,620 or sudo. Sudo is much, much better. To get root permissions. 13 00:00:57,259 --> 00:01:04,120 Let me make a drawing so that I can show you a bit about. Kernel space and user space and the. Way how the Linux operating system is organized. 14 00:01:05,299 --> 00:01:08,875 In the design of the Linux operating system there are two 15 00:01:08,875 --> 00:01:12,450 essential parts and we can draw a line in the middle. 16 00:01:13,189 --> 00:01:19,420 The lower part is kernel space, kernel. Space, which is also referred to as system space. 17 00:01:20,000 --> 00:01:23,810 This is where the kernel is used. The heart of the Linux operating system 18 00:01:23,810 --> 00:01:27,620 and the mission of the kernel is to address the hardware in your system. 19 00:01:28,420 --> 00:01:30,579 The kernel is doing so by using drivers. 20 00:01:31,250 --> 00:01:36,290 And in this kernel space there is. Also a user account, and we call that user Root. 21 00:01:37,489 --> 00:01:40,849 Root is a default user that exists. On all Linux distributions. 22 00:01:41,930 --> 00:01:47,349 It's a kernel space user, and as such there are no limitations for the. Root user, which makes it very dangerous. 23 00:01:48,469 --> 00:01:52,894 Then we have user space, and in user space you are going to 24 00:01:52,894 --> 00:01:57,319 run your applications and your users are going. To do their work. 25 00:01:58,260 --> 00:02:05,239 Now, the user space from user space, sometimes you need access to what the kernel is doing, and that needs to happen in a secure way. 26 00:02:05,799 --> 00:02:11,724 And that is why on the boundary between user space and kernel space, 27 00:02:11,724 --> 00:02:17,650 systems like permissions are used and interfaces like system calls are provided. 28 00:02:18,379 --> 00:02:24,032 Now, the interesting thing here is that permissions are mainly for allowing user space to access parts of kernel 29 00:02:24,032 --> 00:02:29,685 space, like users who want to access a file. But if you are the root user, you are beyond 30 00:02:29,685 --> 00:02:35,337 permissions, and that is why we will see that if you are root, even if you don't have permissions 31 00:02:35,337 --> 00:02:40,990 at all, you can read the files anyway, and that makes this root user so very dangerous.