1 00:00:00,960 --> 00:00:05,710 Right now, it's time to talk about something very important, which is the pseudo should comment, 2 00:00:05,750 --> 00:00:08,620 OK, or the Sudworth by now, what is it? 3 00:00:08,930 --> 00:00:11,120 So if I type mentioned like this. 4 00:00:12,430 --> 00:00:16,910 You can see that we will get that, execute a command as another user. 5 00:00:17,200 --> 00:00:23,930 OK, so here, if you have the description, it allows a permitted user to execute a command as the 6 00:00:23,930 --> 00:00:25,560 super user or another user. 7 00:00:25,720 --> 00:00:28,640 And the most cases is the one somebody who is on, which is the root command. 8 00:00:28,660 --> 00:00:35,700 By the way, the road user, I mean, and you can see that there is security policies to do a lot of 9 00:00:35,710 --> 00:00:37,420 options for the pseudo and so on. 10 00:00:37,430 --> 00:00:41,640 You can read more if you are interested, but I want to show you the most important things. 11 00:00:42,310 --> 00:00:44,620 No, I am the one to use. 12 00:00:45,040 --> 00:00:48,610 And by the way, I am using that on US cloud. 13 00:00:49,150 --> 00:00:53,390 So by default, the Ubuntu user or the Ubuntu machine, it has the option to use. 14 00:00:53,530 --> 00:00:57,370 And this user is a power user, which means using the pseudo. 15 00:00:57,910 --> 00:01:01,600 It will not ask you any question. 16 00:01:02,020 --> 00:01:04,920 It will not ask you or prompt you for password. 17 00:01:05,140 --> 00:01:10,630 So you can just type Pseudolus and you can see everything is here as a student. 18 00:01:11,030 --> 00:01:11,470 Right. 19 00:01:11,740 --> 00:01:12,160 All right. 20 00:01:13,850 --> 00:01:19,480 Now, this is by default, by the way, so that's why it's better to have another user, not the default 21 00:01:19,490 --> 00:01:21,650 user, because this is a very dangerous user. 22 00:01:21,680 --> 00:01:27,950 This is anyone type pseudo or anyone has an open door type pseudo and it has the privilege of fraud, 23 00:01:28,520 --> 00:01:30,200 which is something very dangerous. 24 00:01:30,440 --> 00:01:33,020 OK, so for now, let's use the Zuckermann. 25 00:01:33,350 --> 00:01:34,160 The Zuckermann. 26 00:01:34,190 --> 00:01:41,300 Actually, if I type Mansor, you can see that this is to change user ID or become a Subaru's, which 27 00:01:41,300 --> 00:01:42,800 means if I type so. 28 00:01:44,110 --> 00:01:45,670 I've been type throughout. 29 00:01:46,680 --> 00:01:51,720 You can see that I will go to the road user, but it will ask for a password. 30 00:01:52,020 --> 00:01:58,200 The password for the open to that, by the way, and after I type it to see if I am authorized or not. 31 00:01:58,410 --> 00:02:03,710 But actually, I don't have that's what I will type control the controls it. 32 00:02:04,500 --> 00:02:07,070 So let's clear the screen door. 33 00:02:07,290 --> 00:02:08,450 I will not use to. 34 00:02:10,110 --> 00:02:11,760 On if I will do Sudoku. 35 00:02:12,190 --> 00:02:15,310 OK, dish out without dish for now. 36 00:02:15,550 --> 00:02:21,120 So to do so, it wouldn't let this use up to go to this specific user by default. 37 00:02:21,130 --> 00:02:24,370 If I didn't provide any user, it will be rude by default. 38 00:02:24,400 --> 00:02:28,880 OK, so I want to go to the root user and using the pseudo permission. 39 00:02:29,080 --> 00:02:32,790 So if I type it like this, you can see that this time I am the root user. 40 00:02:33,010 --> 00:02:38,140 And again, by the way, I didn't prompt they didn't bring me any password or something because this 41 00:02:38,140 --> 00:02:42,850 is in to ask for your machines or I they called it. 42 00:02:43,060 --> 00:02:44,800 It is the Ubuntu here. 43 00:02:44,800 --> 00:02:46,060 It is the power user. 44 00:02:46,210 --> 00:02:47,920 OK, so this is the root. 45 00:02:48,160 --> 00:02:52,210 OK, contrary to exit from the machine, which is the rotation. 46 00:02:52,490 --> 00:02:53,820 OK, now let's return to that. 47 00:02:54,520 --> 00:03:02,170 Now if you will notice after I go to the SUDA to the root user, I still in the home directory of omentum 48 00:03:02,530 --> 00:03:05,660 and we still have the environment variable of Ubuntu. 49 00:03:05,900 --> 00:03:07,030 Now I don't need that. 50 00:03:07,150 --> 00:03:13,240 I need to go to the so I need to go to the root user and I need to go to the home directory for road 51 00:03:13,510 --> 00:03:21,850 as well as I want to import the environment or export the environment variable upwood. 52 00:03:21,940 --> 00:03:23,440 So I would use the Desh. 53 00:03:24,160 --> 00:03:25,120 It means two things. 54 00:03:25,360 --> 00:03:33,490 Go to the home of this user who are going to which is in my case, root and export all the environment 55 00:03:33,490 --> 00:03:38,080 very best for this user, which is in my case, because by default, if I didn't provide any user, 56 00:03:38,080 --> 00:03:40,090 it will be so presenta. 57 00:03:40,540 --> 00:03:46,270 So you can see currently I am who I am if I type about kashrut, which means the home directory of the 58 00:03:46,270 --> 00:03:46,540 road. 59 00:03:46,750 --> 00:03:48,970 And it worked 100 percent so far. 60 00:03:48,970 --> 00:03:49,330 So good. 61 00:03:49,690 --> 00:03:50,110 All right. 62 00:03:50,350 --> 00:03:53,030 Now let's have a look on the Sudworth fight. 63 00:03:53,180 --> 00:03:58,840 If then ETSI Sudworth, you can see that we have this file here. 64 00:03:59,200 --> 00:04:01,710 You can see that we have Sudworth also towards the D. 65 00:04:01,870 --> 00:04:04,060 So if you want to edit, the suit was fine. 66 00:04:04,060 --> 00:04:05,560 It's better to have it on this one. 67 00:04:05,670 --> 00:04:07,390 The deal this is the best practice, by the way. 68 00:04:07,630 --> 00:04:12,880 But anyway, we are just viewing only as we don't need to change anything in this once. 69 00:04:13,270 --> 00:04:14,620 So let's have a look here. 70 00:04:14,890 --> 00:04:15,700 You can see that. 71 00:04:15,700 --> 00:04:16,090 Yeah. 72 00:04:16,100 --> 00:04:16,990 Permission denied. 73 00:04:17,050 --> 00:04:17,740 Why is that? 74 00:04:17,980 --> 00:04:22,830 Because this fight actually is protected by on the root can do that. 75 00:04:23,080 --> 00:04:27,130 Imagine if anyone in the system and user in the system can do that. 76 00:04:27,280 --> 00:04:28,390 So we are -- up. 77 00:04:28,390 --> 00:04:30,340 But by the way, sorry about the language. 78 00:04:30,640 --> 00:04:37,510 OK, so if I typed don't shift one, shift one, which is the exclamation mark now I will use this to 79 00:04:37,510 --> 00:04:40,330 run the previous command, which is this one as a root. 80 00:04:40,750 --> 00:04:42,970 And by the way, you can see the state read-only. 81 00:04:43,970 --> 00:04:48,140 But because I am the truth, I can't edit it, it's OK because I am king right now. 82 00:04:48,610 --> 00:04:54,080 OK, now you can see that this is the format, the difficult environment, difficult man, whatever 83 00:04:54,470 --> 00:04:57,080 secure bath for the default behavior. 84 00:04:57,350 --> 00:04:59,920 These are environmentally driven, by the way, or very busy. 85 00:05:00,710 --> 00:05:02,960 So you can see that here is the privilege we want. 86 00:05:03,140 --> 00:05:08,500 So for the road user, we have all Equant, all old and the old. 87 00:05:08,930 --> 00:05:10,730 Now, what are all of these old? 88 00:05:11,000 --> 00:05:16,370 OK, now all which means the terminal or that terminal I am opening on or the concern. 89 00:05:16,670 --> 00:05:18,800 If you are interested, you can read more about it. 90 00:05:18,800 --> 00:05:22,040 But what is most important, which is oil, which means all user. 91 00:05:22,190 --> 00:05:28,060 So run this as all user and run this as all user and here all, which means all comments. 92 00:05:28,220 --> 00:05:34,250 So route user can run everything as everyone and for every comment. 93 00:05:34,260 --> 00:05:37,580 OK, and this is the same thing for the admin groups. 94 00:05:37,580 --> 00:05:40,490 But by the way, you can see that there is a Bessant symbol here. 95 00:05:40,700 --> 00:05:41,570 OK, shift five. 96 00:05:41,780 --> 00:05:48,980 So this means that the admin group, any member inside it, will be able to run all, all, all the 97 00:05:48,980 --> 00:05:49,410 same thing. 98 00:05:49,610 --> 00:05:52,420 Now, this is the same thing for the pseudo, by the way. 99 00:05:52,880 --> 00:05:55,500 So you can see that here is a person. 100 00:05:55,520 --> 00:06:02,990 So this is a pseudo group, by the way, we already saw that this quote from this for now, if I type 101 00:06:02,990 --> 00:06:09,440 ID or groups, whatever, you can see that the groups that object to inside it, one of them is Sudam. 102 00:06:09,770 --> 00:06:10,660 We already saw that. 103 00:06:10,910 --> 00:06:13,310 So let's again open that. 104 00:06:13,310 --> 00:06:14,170 So it was fine. 105 00:06:14,480 --> 00:06:20,300 So you can see that for the student group, it is all, all, all and all. 106 00:06:20,510 --> 00:06:25,370 But you can see that we have this argument, which is nobody with anyone inside the SUDA, the group 107 00:06:25,400 --> 00:06:32,750 will be able to run all the commands for as all user or as all group from all Terminates or Hitwise 108 00:06:32,750 --> 00:06:35,610 or whatever without prompting any basswood. 109 00:06:35,720 --> 00:06:37,120 OK, all right. 110 00:06:37,370 --> 00:06:41,230 And actually it's better to edit this by not using them. 111 00:06:41,240 --> 00:06:44,220 Actually we have the wide pseudo command. 112 00:06:44,360 --> 00:06:49,320 OK, so why should pseudo and actually it requires you to, as you can see, the mission to unite, 113 00:06:49,340 --> 00:06:50,450 to cause you to be a student. 114 00:06:50,990 --> 00:06:54,170 And we already mentioned that we don't need to talk about it anymore. 115 00:06:54,470 --> 00:06:56,840 Why it needs I mean, why it needs the permission. 116 00:06:57,020 --> 00:06:57,420 OK. 117 00:06:57,440 --> 00:06:58,130 So here. 118 00:06:59,090 --> 00:07:00,930 You can see that we are losing, by the way. 119 00:07:00,970 --> 00:07:05,730 No, no, I don't know why, because this is what they prefer anyway, but it's not bad. 120 00:07:05,750 --> 00:07:06,640 I'm not saying it's bad. 121 00:07:06,920 --> 00:07:08,250 It's up to you what you prefer. 122 00:07:08,660 --> 00:07:11,930 OK, so here you can see that I can't eat anything I want. 123 00:07:12,200 --> 00:07:18,320 But by the way, if you cannot hear the name of the fight is the tape, which means that this is to 124 00:07:18,320 --> 00:07:20,830 save to safely secure your flight. 125 00:07:21,020 --> 00:07:27,750 So, by the way, if you for example, so you can see there, it's easy to do as the engine. 126 00:07:27,840 --> 00:07:30,890 So no change has been made, have been made. 127 00:07:31,460 --> 00:07:37,850 So by the way, if you open the Sudworth and if you if you -- up here, actually you put some mistake 128 00:07:37,850 --> 00:07:38,480 or something. 129 00:07:39,740 --> 00:07:44,370 Actually, the whole system will be done or the whole system cannot use to do anymore. 130 00:07:44,660 --> 00:07:52,590 So, for example, if you don't have an explicit access to the root user, then you are done. 131 00:07:52,820 --> 00:07:59,090 Actually, unless you have the physical access on the server, then you will go inside it as a single 132 00:07:59,090 --> 00:08:03,380 mode, which means as a rule, then added to the fight, which is the root fight. 133 00:08:03,380 --> 00:08:04,470 It is to do what is fine. 134 00:08:04,490 --> 00:08:10,610 I mean, then return it to its original or modify the mistake that you done. 135 00:08:10,900 --> 00:08:16,000 Then everything is returned back because actually you are using them immediately. 136 00:08:16,370 --> 00:08:23,420 But if you are using Vasudha, which is this command here, even if I type like this, so imagine with 137 00:08:23,420 --> 00:08:23,660 me. 138 00:08:24,200 --> 00:08:25,590 So you have for example let's. 139 00:08:25,610 --> 00:08:28,250 But any arbitrary value by the way, this is a mistake. 140 00:08:28,430 --> 00:08:28,790 Yeah. 141 00:08:28,790 --> 00:08:29,900 So let's save that. 142 00:08:30,140 --> 00:08:31,580 And actually this is bad. 143 00:08:31,580 --> 00:08:36,560 You can see that I'm just watching I think, but I'm using the power to do so by pseudo. 144 00:08:36,710 --> 00:08:41,060 It will not -- you up so you will see the way this inter you can see that. 145 00:08:41,060 --> 00:08:47,150 Yeah it show me etsi so the word syntax error syntax error nearline. 146 00:08:47,150 --> 00:08:47,810 Twenty one. 147 00:08:48,060 --> 00:08:49,230 OK, so what now. 148 00:08:49,910 --> 00:08:51,560 So listen up for example. 149 00:08:51,740 --> 00:08:57,590 So you can see that the options are either to the was file again or exit without saving change to suit 150 00:08:58,190 --> 00:09:00,400 or quit and see changes to do are fine. 151 00:09:00,560 --> 00:09:02,130 And this is being done now. 152 00:09:02,150 --> 00:09:03,590 Actually this is not just danger. 153 00:09:03,710 --> 00:09:04,450 This is stupid. 154 00:09:04,610 --> 00:09:07,040 So if you do that, quit and save the change. 155 00:09:07,040 --> 00:09:13,630 Even though you got a warning, there is a syntax for undecidable file, then maybe you are stupid. 156 00:09:13,640 --> 00:09:16,310 Sorry for that or it is a mistake. 157 00:09:16,400 --> 00:09:17,990 And if it is a mistake, you are forgiven. 158 00:09:17,990 --> 00:09:18,970 It's OK, no problem. 159 00:09:19,370 --> 00:09:24,200 But actually I want to eat, which means it should wash it again or exit without saving. 160 00:09:24,210 --> 00:09:27,130 So eat so you can see here again. 161 00:09:27,140 --> 00:09:27,830 Oh yeah. 162 00:09:28,010 --> 00:09:30,740 Which is this line and I want to delete it. 163 00:09:30,740 --> 00:09:31,700 Just delete everything. 164 00:09:32,180 --> 00:09:32,450 Yeah. 165 00:09:32,450 --> 00:09:34,150 And click that and. 166 00:09:34,160 --> 00:09:34,520 Yes. 167 00:09:35,670 --> 00:09:42,870 It said this and said, oh, we didn't get any problems, so you can see that no errors shown here. 168 00:09:42,900 --> 00:09:48,360 All right, so everything is work but fine, which means there is no mistake. 169 00:09:48,360 --> 00:09:57,120 But if I eat it so you can see if I eat it, then that suit was filed immediately like this. 170 00:09:57,720 --> 00:10:00,600 If I make the mistake here, you can see that. 171 00:10:00,600 --> 00:10:05,310 Yeah, it's you can see that it is because I am I can edit it immediately. 172 00:10:05,610 --> 00:10:09,460 So you can see I said that the whole system cannot use to do anymore. 173 00:10:09,600 --> 00:10:10,260 Why is that? 174 00:10:10,260 --> 00:10:14,480 Because there is a syntax actually in that sudworth. 175 00:10:14,760 --> 00:10:20,060 So anyone try to use Sudo with something, it will not be working at all. 176 00:10:20,640 --> 00:10:27,030 So unless the solution for that, unless you have a physical access to the server, which means to open 177 00:10:27,030 --> 00:10:28,050 it as a single mode. 178 00:10:28,080 --> 00:10:32,090 So if you are using the cloud, you are actually not turn back. 179 00:10:32,310 --> 00:10:33,660 Well, actually it's not like that. 180 00:10:33,900 --> 00:10:42,120 You can just attach the podium and attach it again or change the fights there and then attach it that 181 00:10:42,120 --> 00:10:44,870 actually there is a work for that work around it. 182 00:10:45,150 --> 00:10:52,380 There is a solution for that, but it is Hajduk and a lot of work to do and you already have enough 183 00:10:52,380 --> 00:10:53,420 work to do, actually. 184 00:10:54,300 --> 00:11:01,590 The other solution, if you have an explicit access to the user, in that case, you can just attach 185 00:11:01,800 --> 00:11:08,130 to the system as a route user and then change whatever because you are the road user, which means you 186 00:11:08,130 --> 00:11:12,060 can do whatever the system and then change the necessary. 187 00:11:12,360 --> 00:11:13,510 By the way, the road user. 188 00:11:13,530 --> 00:11:16,740 Yeah, it is the king on the system and can do whatever it want. 189 00:11:16,890 --> 00:11:23,130 But by the way, I can change its privilege so I can make it Lisboa by the way. 190 00:11:23,580 --> 00:11:25,000 And we will, we will not. 191 00:11:25,020 --> 00:11:26,250 And that you can read about it. 192 00:11:26,460 --> 00:11:28,290 We not that in this lecture. 193 00:11:28,320 --> 00:11:28,640 Alright. 194 00:11:28,860 --> 00:11:29,640 Thanks for watching.