Okay, let's get started
Of course, there. Okay, so good morning, everyone. So today I want to talk.
So let's first just talk about where we are on the term because big things are coming up.
So today is lecture 8 thursday's lecture 9, and then next, and then we have you, of course, have Thanksgiving.
Break this weekend, and then
Okay, and then we'll we'll have you know the midterm of you.
And then the midterm in class, so midterm is coming up fast.
It's an early midterm a couple of reasons for the early midterm. one is that you're gonna have I'm.
Sure you have other midterms the following week and so there's conflict with those but and so this way, hopefully, you'll get this done out of the way.
But the other big reason is we've kind of covered up to this point use basically the stuff that's not the kernel.
We kind of discussed the more systems part, and I really want to spend more time talking about how the kernel works.
But you have to have a good understanding of what's happening on the user space side before.
Really the kernel stuff makes sense because it's kind of a flip side.
So really the stuff before the midterm is most of the user space stuff we're covering, and that afterwards is there.
But this is a little more rush than I normally do.
Just the way the calendar works so but I but you I i'm gonna be talking about some things that I haven't talked about yet from tutorial for tutorial 3 at this point i'm
hoping it's clear if you have some questions about tutorial. you know, tutorial 3 let me know, but otherwise my plan today is to focus on tutorial, for which will lead directly into the
assignment.
So so there's a couple of things so there's a couple of things in this tutorial one is Ssh.
And you've been using session this trying to get you to do a few more things.
It's important to understand enough about ssh in order to be able to do the work. but that's not as you note an assignment that's not the that's not really tested there so that's not going to be on the
midterm. I do want to explain it if there's time but I want to focus on some of the other parts first
So. So there's a i a question here. what what are the major topics to study, you know, to study so one trouble with operating systems.
Everything is kind of interconnected when you look at one part. you're actually seeing a whole bunch of other things, And so it's kind of say like, Oh, you just read this or just read that what I expect you to do is focus
on the tutorials and go like I have these things that I don't understand, and what i'm seeing keep those questions, and then work on trying to understand them
Yeah. So the midterm is covering assignments, one and 2.
So
That's right to total 4
I can say ssh is on the midterm ssh isn't on assignment 2 or assignment one, so it's not in the midterm
Yes, assignment, you will get assignment one marks back. the The ta should hopefully have the grading done by Thursday or so, and so i'm hoping to get it done by the weekend.
You know. get get all the marks together, so I will keep you all updated on teams when those are posted
So let's talk so in terms of permissions users and stuff.
I wanna shit, you know. Look at something that we looked at before.
So this is my desktop here
Tutorial to his tutorial for is very much connected with assignment to it.
Just doesn't have ssh on it everything else is there basically
So the what are we looking at here when we do this?
Ls: So there's there's a lot of information in this. And so what My goal today is to make sure you want all of this here, and what what's going on here?
So first off we have our final names. we have a file names here.
We have directories, you know. you can see like the Ls.
Is shown with a slash at the end, just to note it.
And then we o up side thing. Did you all know how to unpack this 3,000 user login dot target?
Yeah, you'll unpack this so just you know if down to you right how to?
Yeah, so I should put I should put this into it i'm i'm i'm getting to those other things.
So key concepts here. So first off we have so
So first let me see
Cc. files and directories. you see file. size. So we see a date which is the last modified thing.
So that's the last module the date the file was last modified my date.
That's the timestamp There There is a file size and bytes?
Is it from 0 to 24 it's a time.
Oh, the the time here It depends on it. I Yeah, this this is in 24 h time.
Yeah, is the file size, and bytes there's file owner and group.
So i'm putting in start things I want to talk definitely more about so file owner and group.
We're going to talk about and then
And there's a link
To right of
So these last. So the things I have not starred are things that I think you should basically understand.
At this point so rest and then there's a
It's a total block. So these are the things I need to go through.
So first let's talk about the from let's talk about the ownership and group.
So
The actual operating system doesn't actually deal with names for users and groups.
They actually deal with numbers. there's a uid and a Gid, and if you look at Ec.
Password. They are the they have the mapping. So this is stuff.
This is all. this is what think tutorial for is dealing with.
If you're seeing the mapping between those and we using and 3,000 user login is doing lookups based on this
Yeah, the first letter really? Well, we're we're gonna talk about the first letter, really?
Why So don't worry So yeah so associate so there's a user Id and I you know group Id So that's so.
What is the purpose of this
And that's what you know
User, Id
So us
The main user Ids and group ids. that are associated with every process.
Every process has.
So
So so just be clear. There is there's user ids and the every process has a user.
Id and it effective user, Id and a group Id and an effective group Id now most of the time these 2 are equal, and it's only under very specific circumstance that they're not equal and I will explain those shortly But But
we have these, but these permission checks are are actually done with the effective group.
Id and the effective user Id these are normally equal so it doesn't matter. but with a but these are also the things that identify who owns this process, And so that stays the same.
And so we'll see why we want these 2 different concepts when we talk about the set uid mechanism is that u Id and set Gid mechanism.
But that's we're getting to that so so these are so.
So this is the so. so to a first, you know. so
So are the Uids relative to what group sarah Alright, I I i'm getting there hold on
When I say these sets of permission bets
These are the so we call permission bits we're talking about these.
Now, why talk about bits is because each of these is a bit flag?
It's a one or 0. We use textual representations because well, they're a lot easier to understand you know.
A lot easier human seat. But underlying this, these are actually bits.
And you guys have a bite or more, you know a bite of permissions where each bit means something dependent upon different contacts.
So here will so when there's a letter present it means the bit is present, and if there's a dash, it means, you know, the bit is set to one, and if it does a dash, the bit is set to 0 so here
we're saying the read bit the right bit the execute bit it's set.
So those are all there here we're saying the read bit is set, but the right bit is not set that's set to 0, and the X cubed is.
Set. and here again the read bit is set, but right is not set.
And so this is 1 1, 1, 1 0, 1 1 0 1.
But you know so we have readwrite execute we don't execute, reader, and execute I'm. ignoring the first first one that separate ignored for now Oh, but watch it I can tell you that Well, so.
This is so, the first one tells you what what type of file it is, if it's a dash, it means a regular file.
If it's a D. it's a directory it can be more things we'll talk about that in a second.
Yeah, yeah, D means directory, and then Yeah. Well, I mean accessing.
I mean a system call opening it exactly you're exactly right that means I first basically mean when you open the file.
So let me let me go and clarify that
So let's go bring them up there so we have these bits. So we're going through, and so the first set of bits.
These first 3 referred to what the owner of the file can do.
The next set of bits to say what the group associated with the file has, and the third and this are the other bits for everyone else.
So if a process, So this file right here is readable and writable by the user and the group.
So if you are the if a process is the user soma or whatever you Id associate with user summer, they can read and write this file, and if they if it's the group, so mom for various reasons, there's also a group
typically by your username that can also be written. but anyone else can only read the file.
They can't write to it
I'm i'm getting to the total 40 that that's a that's a little further away there
My group. I What I mean is what specifically group is 2 things There's the group of the file which is the you know, Group.
What group does this file belong to and then it's a group of the process?
Those are the things. How do you so How do you know whether you're in the group or not?
It's, does it match or not so this is the algorithm?
If the file yup, use the first phase
If our mission is all set for all 3 levels of access, like, say, the rebits is something gonna read.
The files still do the pressure, or just allow the process to access the file.
This, remember we're talking computers so it's an algorithm.
Now, normally, permission bits are our most permissive to least permissive.
So normally the owner has more privileges than the group has more privileges than everyone else. but that doesn't have to technically be true.
You can actually make a file that the user can't access what everyone else can access.
You technically can do this. I can't think of a good reason normally to do this, put the permission system, let you do it so.
I'm not gonna talk about become because become is in the assignment, But I will say the stuff i'm talking about is definitely relevant to become
I'm just not going to
Does that mean? If you share a file with us, you have pro others.
Okay. So
Okay, i'll i'll i'll get to some of these other questions. I always want to keep talking here.
So. so these are the permission you have to read right and execute.
Each can be set to one is being set to 0. so we can make files here, so we can make files like.
For example, I can do a
So I made a file through text
So this is here now. it is readable and writable by me is not readable by it.
It's readable by group and other so I can do something where I do
So i've now to that so i've now made this file so that it's no longer so I turned off those 2 bits.
I've turned out the user bits to read and write bits.
So now I just have the group and others. now I am in the same group I'm in Soma.
But it says, I know I certainly other everyone else's will you know can do it.
But if I try reading it now, I can't read the file, I am doing Oh, I think I have dog nor i'm in
Yeah, every file. So what are the So
I just want to emphasize this file permissions can be a little confusing.
They're at their base actually very simple and I could explain them 10 times and more and more of you will get it.
But most of you will never get it until you actually try using them.
And seeing what happens. So I don't expect this to be completely clear to you, which is basically the point what I was hoping is for you guys to be doing things.
The tutorial. You do the experiments, and I explain it.
And then everything comes together. Yeah, there's all the say I didn't work for here.
Well, she's over there there he is anyway. so so you can set the permission bits in a way that you see here I set this file to not be readable by me, you know, and I can't read it but now I turn on that
bit.
Now we can also specify permission bits using octal numbers.
And that's important to real tonight
We Haven't talked about execute bits I will talk about that in a second.
Here, so I can do things like
So I just set this to be so. 4 plus 2 is 6.
So I get read right for the owner, and then I get read, because I set 4 here, and then 4 for that
So what what use is it to make yourself stop reading a file when you can change the read bit again and reread it Exactly.
You're right for the owner changing permissions to give themselves lack no to take away their own permissions normally like that's kind of dumb.
I can always do it. but until you change those those permissions, a process can access it, so it will cause a read error, I mean, you know.
So it might prevent you from accidentally like I guess for example, it's like marking one of your files is read-only, maybe is to prevent you from accidentally reading it.
Or maybe you have a process you don't want to accidentally.
It's a system it has mechanisms it's more about what you can express in it, as everything useful, not so much so, but so then.
Now one thing is, we can set files to be executable, so
So reading right bits of controlling what open does
So the reading right bits are basically for open, just like, Can I read it or write it?
Okay, but the execute bit is specifically for the exact v.
E system calls says, will it run it or not? or what?
Exactly you going like. If this is not a you know this is not something.
So I can actually we let's move i'm just doing this, for from my you know, perspective here, so let's so.
So this is how you make a text file executable.
I think I messed this up last time, but you use an exclamation point.
I a pound an explanation point, and then you get the name of the interpreter.
So, Ben Bash, and say this and so here we're saying echo!
And so now this is a little program So program that does for this i'll make it listen
It's a program It does this
So there's the file. So now I can type bash sh and it runs, you know, as I think.
But if I just type sh! it says permission denied, why is it mission?
9. it's because it doesn't have the executive set, so I can say a for everyone all Oh, food food, dot sh!
And now I can run it, and it runs now, so you can set the permission, bit the execute permission, but on any file, and the kernel will try running.
It. but if I tried
Okay.
I get this basically, if it's a text file the kernel is gonna try running a shower interpreter on it.
And if that's it, we get the same error So this is basically Bash trying to interpret the textbook because it's the default interpreter.
Well the sh, the shells into a vault interpreter.
You could also use. but this could be a Python script.
It would be A. no Js script, be anything.
You just change it by changing this first line, Remember file extensions in
Shshabbang Yeah that's called shabby yeah.
Martin, why is the X few bit is more like a bite?
No it's all stored as bits that's I mean all the permission bits all fit in a bite.
But when you use sources of temporarily changing the bits oh, so course doesn't change the so so there's a command called help Source.
You can say source, all that does so. So the big difference with source source has nothing to do with exactly
I'm saying shell because you this also works for other unit shells.
But yeah.
Yeah, the trouble is It's it's ls that's interpreting them as Ls is the thing interpreting the things as bits.
That's why i'm showing you that you can say Chamad and use octal numbers yeah, yeah, yeah, that's why you say you use awful numbers. Because you're actually just setting.
The bits. Now there's a couple of other bits that aren't displayed so clear there's yeah
So there.
Right.
So character, device, and block devices we're going to talk about that more after
Similarly we're we're chocolate
Yeah, permission bits are from the far from the file system.
Yes, there's many layers to understanding what's going on right here, and to really understand what's going on you need to understand what the kernel is doing.
We will be getting to that. Could you take away the ability of other use to change permission on the file?
So I upload a file from the web and I download that file user upload the file. make it so.
I cannot change permissions of set file. No.
So this is idea of data versus Metadata so if you're.
You have metadata is data about data and normally, when you talk about what's in a file like the file.
What you download something you're down with the contents the file. The metadata is what your local system puts on it, and, in fact, can put all kinds of stuff.
In fact, a lot of like windows, and Mac Os will actually keep track of this file has been downloaded from the network, as metadata, and will potentially control.
Who can access that file? because saying, Oh, this came from an outside source.
This might be dangerous, so we better check it that's just file metadata.
So does this mean? if someone puts the could be the only file I need to make, I download it.
It will be read only for me. Well, the if the if the file is read only on their side, like on the web server.
You're downloading something from a web server and it won't be we'd only your system. But now, if you downloaded a zip file in the zoom contain read-only files, when you
unpack them, they might byte of all become read-only files.
But you own them so you could change our permissions now I haven't talked about route yet.
Let me let me talk about that now. So
Oh, so you can always now
So
Let's see if that's right so let's see pseudo
Yeah.
I'm I
We're trying to remember there is so i'm trying to remember if pseudo actually
So it runs it as route so that's why, if you pseudo dash I i'm now running as root Now it you only see Euid reported if it's not the same
It gets so the unauthorized, as we report it, gets reported to the logs.
The Carson. if you do a pseudo you're not authorized. It just gets put in the long.
That's not like tell everyone else
So. No, if I now let's take a look at something here off
So Ben Ls is, is, and similarly
So all the you know, all the program, all program binary, most most system files will be owned by
Close
Yeah. So Jason, we're gonna talk about w we go so th the is this like run as administrator?
Yes, soon as exactly like run as administrator. Now these files are owned by root
They won't gain any additional privileges when you do the exact fee, because otherwise that'd be kind of crazy.
So you run, even though Ls is owned by root.
If you run it, the program runs as the user student or the user Soma on my system.
It runs as the local, you know, appointment of the process. Nothing changes.
I mean, a process is associated with a uid and a Gid, so
So there are these set ui so normally when a process doesn't exactly eat it's uid and gid does not change unless the set you Id and ship gid bits are set pseudo is a command i'm not like
that look at it. it's permission bits or are here
Was with C. s that's that's about to explain yourself if
There's no set bit for other because that wouldn't make sense that bit does have, but it is used for another purpose which we will talk about later, but not for a bit.
But the So There's this estimate set uid set Gid if it's set, you can do if you do, an exactly of the file.
The process eid your egi, you will be changed to the uid or ga of the process.
So that's Why, if I copy
So I is here
So here's Id here so I do what
So i'm gonna make it root so now i'm gonna make it become root when it does that sort of do
So that that's now set you already so notice this quiz Compare this
Regular. Id says this, but this Id instead says, euid equals root.
Everything else is the same except for this little thing, the Eu Id because the uid is not equals.
The Euid. So it gets reported. Specifically, the effective user.
Id is route, which means this process is running with the privileges of root it can do.
In other words, it can bypass the permissions.
Now could you make the set Uid for
Okay. So
So, for your Vm. does. Your root root does not have a password on your Vm.
But you can run the password, command and set a password for root if you want to.
You have free ability to be root and get a root shell you just run pseudo-. I The convention nowadays is not to have a root have the root account to have a password, although it can be useful for
like this is a recovery thing, but the idea is, you want to have a user, have an account, and then you have pseudo, because then you have a record of who became root what user was logged in who is doing this doing
stuff as a as the administrator, that you know root is also further than Israel, because otherwise you oh, someone just logged in as root and started doing stuff.
Who were they? you don't know but if you know they came into a regular user account. and you oh, that's who they are, and of course, in your machines there's only one account.
So if they got in, they use that so is there really much difference?
No, it more makes sense for multi-user systems
Root is on unix root is the most powerful user.
But well think of it this way. you're running inside a virtual machine.
This is running on openstack, which is a system for supporting virtual machines.
If you does, having root in your Vm. give you maximum privileges on the cluster.
No, whoever else can. In fact, if you log into the to the web console, you have more power than root, cause. you can just, you know, destroy the Vm.
It changes the allocation stuff, and if you have power through the web, console you had, you know, higher privilege.
You could do things like give and take away, you know, who could create virtual machine.
So there certainly are potentially additional level of privileges.
But normally outside the scope of the operating system you're talking about. you know the cluster management software.
So, but that's outside the scope of the system
Yeah. So the set you idiot when set will cause the specified users.
So remember there are no real users on the computer I think there's a one
Basically, we have processes and files file system, the directing.
But we have processes and files
So really, all users and groups are labels applied to files and processes that are used to control how they can interact.
That's all you know
Does it display Manager Just affect the Gui?
Then I don't quite understand what that question there's a lot to unpack on on under those concepts.
We're not talking about guis yet I will talk about those at some point, but these userers and groups are just labels.
Apply to them. and so we're just doing these things and it's normally the when a file with a process accesses a file, you get the permission bits and stuff.
But sometimes, if you're doing exactly e you normally want the exactly e of a file, the permissions of the file not to affect the process that's loading that code unless you use set your idea that it messes with me effective
user, Id and effective group, Id
So with all internal commands, how full permissions by default, Good question
So any internal command in the shell it's just the function really in the shell.
So it can do anything, anything else. when we turn an external command that's a binary on file.
You have to exact via, and so it's going to be running in a separate process.
Almost the shell and it's you know suicide but it's They're not gonna run in the same, you know, in the same address space.
They can't see each other so and their permissions are good.
Just be you know different potentially. so let's go back to
What? Why would all shells run as route? A shell is just a binary.
If I type Ls. it runs as my user so no they don't run as route now.
Special commands. Now this is all. let me So like there are things like,
So ,
So login is not set you on your route.
Well, there's a problem i'm thinking oh right
So, for example, there's the password command the password command is set uid root.
Why is it set you Id root because in order to change someone's password?
You need to ask you to modify files owned by root so so that's a you know that's important
Now you'll notice that if we so I just I looks for files that had our dash.
S. So these are all files that do not you don't normally have this, for you know, set uid for for set Gid.
This is common, so these are things that are executable.
You know I know like this is Ssh. agent w all like these things.
Wall and right Ui. these are gift group group tty that allows an access tty's.
So they can write to the terminals, and then other ones are in group shadow.
So why is group shadow? important? Ch: Age, as you know, you know. expiry. Why do we want them to be in the shadow file?
Because they can only know
Shadow file is in group shadow and is here. Now remember this. All was this.
All was in tutorial for
So by default you check the password
Yeah, hash is a one-way function. You learned this if you learn about hash tables, secure hashes, have some cool problems, properties.
If you take like cryptography you'll learn all about them.
But basically, you can't reverse the hash is is this essentially, what is, you can't take the hash and go backwards.
And you know there's no there's basically no easy way of going from a hash to a thing that has that value as a hash.
So you can't when you type in a password you don't just it doesn't remember the password.
It takes that transforms it into a hash and stores a hash.
Now
So if you want to look up, this is a basically a password cracking strategy offline dictionary attacks. not gonna explain.
Now, but you want to you don't want to separate those so that's why
So if you look at these permissions, you notice that Etsy group, Etsy password, are world readable.
Everyone can read them, but G. Shadow and the Shadow files can only be read by users in the group.
Shadow, or, of course, the root user. but other users cannot read those calls.
So I right now
But I can look at i'll take care of but I can look at the password file.
So how if anyone with root privileges can change file permissions, how would you prevent others from say running an expert with pseudo?
Well they shouldn't be able to run it with pseudo, because they shouldn't know the password if they know the password to an account that has pseudo privileges they effectively have group
privileges so that's what Yes, that's Why, you'll constantly get prompted for your password
Oh, okay.
Oh, okay, So yeah, rain rainbow. table salting there's all kinds of fun stuff with passwords beyond the scope of this class.
If I have time later, I can talk about it but let's take focused here.
Now let's talk about the
Pretty association is a system call
So that's all it is about it's a little thing the current working directory
Okay, so that's there so the stuff for ssh and for So the tutorial for goes through some stuff on
So if you look here at 2 to 4, the whole purpose of the Ssh.
Part is really is really to create a second
No, actually that's not it
You couldn't change the shell was changed size it's still Bash, after changing so did you log out and log back in.
We'll see remember see
So I have another. So I have another 15 min I can I yeah i'm gonna talk about.
So so what happens when you log in okay let's let me.
Yeah, I think we're all definitely go in my terminal
Let me stop sharing here i'm going to make it terminal here
I'm just i'm just switching because when I start connecting it. Doesn't connect that well through there.
Okay, let me share my terminal
Okay, Now, I can do it. Okay, let's share Yes, so let's walk through.
So of tutorial, more than
So let's so what are we supposed to do so you're supposed to get ssh running, you know make sure passing authentication is enabled is telling you some problems to deal with there and Then so
let's make it so first let's make a user so we're gonna add a user here
Okay.
Okay, So now, let's just understand what happened when I did this. When I did this add user, there is now a user called some user.
Are you notice that some user is here there now there's also this ses Tech.
App that's there to provide system support they can actually log into these vms as well.
If you have problem, if you're gonna get lose access they should be able to get back in if you look at the end of the password file, you'll see that ses text off is there students me there's some But some
user got added on the end here, and user is 1 0 0, 2, 1 0, 0. 2.
So user Id 1 0 0 2, you know, group group membership, 1 0, 0, 2
We also got a user, some user here that was created yeah same. Id So we made this user here. they're there.
They have a home directory. it's all set up now how do I become that user?
So now I can do
So you can do su dash some user that becomes you know.
Now you know that's how you become the user you 3,000 user login does basically the same thing as suit, as you know.
Su dash su dash the dash means login as it
I can download that at 3,000 login, and we can see how that works in a second.
But what I want to first do is show you what ssh we can do here.
Because why? What this is supposed to be doing here is setting up Ssh! access to this account.
And so what I would say is, you know what I would do is to have notice that when I want to i'm gonna if I log in as
I have a type in my password here now. what if I don't have to type in my password, so I can.
Now I can make a directory. Ssh!
Ready to make sure the Ssh. Directory is only accessible by me, and I go into Dot.
Ssh.
Okay, yeah, that would not work because you have to have directories be executable.
Otherwise you can't go in though
Yes, sir, thank you. This is like sign into a different account.
This is this is a different account. I am some user now what i'm doing right now is i'm gonna try getting ssh to it from my local machine.
Now here I have
So this is my public key that I use fine disclosing it to you all, because that is gives you a no secret, a point of public keys.
So what I can do now is I can do the ssh here I'm going to first copy this
And I just pasted. You could have start up an editor and paste it in there. but I find it easier to do it this way.
Now that's there. make sure the permissions are good here also.
Now one thing is by default. it makes it user. This is due to something called u mass, which is a thing to screen out things to make things up.
So you could change the U mass so It doesn't do that. But that's more advanced usage.
Don't worry about it, but we can do here now.
Just make sure it's not rewritable by anyone else otherwise Ssh will complain about it
Now we're in without any you know any password So that's really why I want you to play with.
This is because it lets you log into your vms without typing in passwords. and you can do except.
And actually it's actually doing this twice here because of course I have this on access.
And similarly on I just, you know if I just ssh
I have a dash directory here. I have an authorized keys file that has a list of the keys that are accessible
Can some users see the files except that we're made by someone user.
Well, that's good question.
So let's see, I can see things I can see all these files.
I can try
I can't create anything there but I can read all these things.
But note if I now log in as student
So Now what i've done is i've changed the permissions of my top level director.
I didn't talk about dot dot dot dot refers to the current directory dot dot refers to the parent directory.
So when you say you go up, you always go up. and now
That goes up the hierarchy. go to the top and Dot refers to where I am right.
Now CD dot that doesn't change in the CD student Now what I did was is I changed the permissions on students, so was only accessible by the student, and nobody else has access that directory. They didn't change the permissions
of anything else. Now, if I log in as some user
Permission tonight. I now can't see anything for the student member yeah, no, no, I can't do anything now.
If I go to my own thing, I can note
Secret text is readable by everyone. Riley Group, you know, and if I log in as student, I go into Chilpot I can go there.
I can read it, because the permissions on secret are not so secret.
I change the permissions on this to be 6 0 0 secret
I can't because i'm not I don't own the file.
I can't change it
Yeah, if you have read permissions, the directory those files are in, you can see them that doesn't mean you can read the file itself.
Yes, shown to own it.
I can't do I can't do it if I do a Oh, if I do a pseudo
You now change the ownership to me and Now i've created this file that's there Now, here's a funny thing I now have made it I can't access secret.
Now this is my own home directory there's a file owned by someone else.
I can't access it Oh, I can't but it's in my directory, so i'm rather annoyed.
But you know what I can do
I can erase it. And now secrets gone. Yeah, see. So just the permission bits and octos
Pseudo doesn't have any funky rules, but I mean pseudo is whether you're logged in as root or not, but in terms of permissions you have access to everything
No, this is no different from windows, this you different users do not have their own dedicated to file systems.
Different users have their own dedicated directories, home directories.
This is exactly the same. You look in slash users windows.
You have different folders, different directories for each user that are owned by them.
This is exactly the same thing. When I do script using pseudo and try to access the home director, it seems to reject my access note.
Who does the pseudo pseudo?
So it says this: Yeah, but oh, yes, in in windows.
You have CD. but in linux it's all one tree.
Yes, those are drive letters. Exactly so. the top, which is just a double let this having C and D directories just no more.
Yeah, they're basically they're just mount points in modern modern windows.
Yeah. tribe was an old legacy thing. notice this area.
How do you fix this error? Why is this error happening?
The error is happening, because if you look at them, there is a group here called pseudo and the pseudo.
The members of the pseudo group is student and a Cs tech staff is some user member of that.
No, so they can't do it Oh, pseudo it's not it's not file for it, but pseudo checks the pseudo group, and if it's in there Oh, by the way Why, is this
red It's, because it's set uid root and so this is a very dangerous binary and that's why it's marked as red so let's give ourselves let's look in as here a student.
Time to come root.
I'm gonna edit group and i'm going to add pseudo
I've changed, you know, added them onto that line and now I can log out.
Now I am, and some user and now worked Pseudo now works because pseudo, because the user doing the pseudo command is a member of the group pseudo.
But before, because they weren't a member of that group pseudo said, You're not allowed so the units permissions get used in lots of ways.
You have to really know it's on a per command per thing it's all conventions these are all mechanisms.
There's no like you know global rule but this is what happens with Cdo.
How did I add myself to the pseudo group it's it's literally
I just edited this file. You see this file here at C group.
I just added, added it to this line right here that's it
Out of curiosity. Where are the incident? Report be kept?
No, I not here
Here this is where? yeah, So pseudo some user worked here, let's see.
Maybe there should be a failed
Here's the line that's the report is in the log so we're out of time here, So I've got to stop here. so that's all that's happened is a stereotype and if you're
on some systems. those logs are set to it's called the seam, which is basically a system for processing logs or automatically get parsed. and potentially a message would have been sent to administrator.
Saying, Oh, no! but they would have to have set up a rule for it.
But it means it got logged anyway. i've got to
Stop here. I can stick around for questions for a bit and I have office hours, but otherwise
Yeah, there's go watch this lab I definitely showed a lot of stuff.
But this is all stuff that's in the tutorial i'm literally just showing you things that are there.
So when you go through and try to figure it out i'm just giving you another perspective on it.
How have a great day? I will see you on Thursday