 Hey everybody, welcome back to the channel today. I'm gonna talk a little bit about a little program called do as now What is do as do as is an alternative to pseudo? so if you don't know what pseudo is I'm really can't help you because I mean Really seriously pseudo is the Program you use in order to run a you up command is root I mean, I guess that's the easiest way to say it But really pseudo is this huge mungus program that is integrated into all Linux systems that controls User permissions, I guess is the way best way to put it Um, and it's very because it is big. It's the configuration file is a huge mungus If that's a word, you know, it's hundreds of lines long Most of those are comments usually but if you get in there and you have to make you say you make a new user something you'll probably have to add Permissions to the pseudo worst file in order to give that user permission to act as root Usually they need root permissions in order to install anything, right? So the problem with that is if you get into that configuration file and you make a mistake You could break something and it's because it's it's this huge program It's this huge configuration file and it's easy to make a mistake and you really could point your system So and that's a technical term boink your system, I'm just I'm just putting that out there So do as is an alternative to pseudo and it's a very small program it's very easy to configure and We won't actually be spending very much time in this video because it's like it's just a really small program Something that you can use, you know, you know as an alternative to pseudo that keeps you from Messing around with that pseudo worst file and it makes it so that if you know if you mess up do as you're not gonna mess up You're not going to boink your system. So let me show you the github page This is the github page for do as now so to install this You really want to be on Arch Linux because the you are awesome. It's in the a you are you just do yay Dash capital S do as Or whatever arch a you are helper you're using if you're using paru or whatever that new thing is called Use that if you're still using pack a you are or whatever if you're on another Linux distribution first of all May God have mercy on your soul I'm still gonna get a lot of help hate for that But if you're on another Linux distribution, you'll probably end up having to make the Do as code yourself just using the make command and all that stuff There are a lot of instructions here on how to install it. You just get clone You can make the package once you have it installed. What do you have to do? So you can't just use it out of the box. You have to create the the Configuration file and it's really fairly easy. So let's just dump into a terminal here Which I already have one open this zoom in so that you can actually see something and we'll just clear this out So what you want me to do is do pseudo touch and then slash Etsy slash do as com now Like I said this file does not exist. So that's why we're touching it And I think it's all I've already done this I'm not going to do it again. And then you just want to do pseudo them Etsy slash do as comp and you'll get probably for your password and Then you'll get this You'll get actually what you'll get is a blank VIM document and You just have to add this to your to the file Obviously you'll need to use your own username. So this is mine. So permit my username as root. That's literally it That's the whole configuration file. You can't mess it up Now if you have other users on your computer, you would You'd get into insert mode create another line you do permit oops, Joe user as root And that's what you do, you know, and if you wanted to use another do not permit Bob user as root. That's all the configuration file. There is now. I'm obviously I don't actually have anybody called Joe user So we'll delete these two lines here and quit out of that and then you just save it And then you can use do as so what is using do as look like so in order to do this I'll need to find a command that actually requires me to Use that actually requires root permissions. So I'm just going to do the same thing. I just did I'm just gonna go do as them slash Etsy Do as comm I actually got a spell it right and then it's going to require password again. Just like pseudo would That's what and then I could go through and make Changes to this read only file which requires root privileges in order to edit. I could also do something like this I could do as Pac-man dash s y y or s y y you if I wanted to actually update And I just do this and do and then it updates just like pseudo would now The one I've only been using this for a little while one thing I will notice the one thing that I did notice about this is that it does not remember That you've entered the password so like in pseudo if you enter your password once in a terminal session It won't expire for 10 15 minutes or something not exactly the most secure thing in the world But it means that you don't have to type your password in over and over again I think that's called persistence with do as you have to enter it each time you use do as now I believe if I remember right there is let's see here Sis persists Maybe not. Maybe I've read this somewhere else Do do do Somewhere here. I was reading We're gonna get past the installation thing Create the configuration fell the configuration do as configuration fell is located here. No, I Don't know if this path here would actually work. I did not I did not install it in Slash local Etsy. I just did it in the Etsy file I'm not sure but it does seem to work. So to create a rule following the users is to do this Please note this shows good for you do as that's not what I'm looking at Somewhere along here. I've read that there is a way to Enable persistence, but maybe it's very the top Okay, I'm back. I cut a whole bunch of like Complete silence out of the video there Had to do a little bit more research so There is a way to make persistence and there is Are several other things that are interesting about do as that I didn't actually know before even before I started the video So I've done a little bit more research so It'll be good because I'll actually make the video a little bit longer because it was only gonna be about five minutes long Now we're gonna make it about ten minutes long anyway So what you're seeing here is the do as dot comp man page now Pat in a alone is a little weird because usually configuration files don't have man pages Usually a command has a man page in this case Do as has both do as you can do man do as and it will show you some stuff and you can do man do as dot comp and you you will get this and the Interesting thing here is there's some things that you can do and and some things that you'll have to do So if you are the type of person who runs a gooey command a gooey program From the command line, you'll have to do a certain thing call keep and and basically this allows you allows do as to Use environment variables and allows them to launch gooey prop applications as Root so you would have to go through and do that you can also go through and use this one here Persist after the user has successfully authenticates do not ask for a password again for some time I don't think I'm looking here. I'm not sure So what I'm going to do actually is go through and Edit mine and see how that persistence works So let's just quit on this and I'm going to do do as and then them that's Enter this here, and then I'm just going to do Permit who persists Matt good Lord cyst per cyst Okay, and then I'm actually go ahead and do Keep and as well You know right and quit this and we can close this now actually I'm going to quit this to it and then just do as and Then do Pac-Man dash s while I do that's because I didn't spell it right There we go That's the works out really well. I don't want to make sure I didn't break it now. Let me see if I can do do as Then Yes, so persists is working that I know I don't know how you can control how long it remembers your password But I'm assuming there's a way Now the last thing I want to try I want to try that keep end part. I want to run a program as administrator like I Don't know This is literally called Lou man manager. Okay oops So if I do do as Blue Man Man, sure. All right, so that keep and actually did not work. I'm probably doing it wrong but That just kind of goes through you there are options So it's not as simple as I was originally making it out to be there are things that you can do to it but if we just do do as Go back into this here again. I was in back in so you can see It's still way simpler than you know Managing a pseudo worse file and that's that's I think the whole point of this so The whole point is to make it simpler so that you don't make mistakes when editing who who has root access to your computer Because if you make a mistake you can either as I said before you can either boink your computer So it doesn't work boink your users so it doesn't work Or you could potentially open up a security Nightmare on your computer where pretty much anyone has root access Say you add every group on your computer to the pseudorist file That means everyone on your computer has complete root access to everybody else's files. That'd be a nightmare It could also, you know Open up root access to some Joe Schmo on the internet who's somehow managed to get access to your network You could literally do anything in the pseudorist file If you don't know what you're doing and it's easy to not know what you're doing because nobody knows what they're doing when it comes To the pseudorist file and that you've used Linux for years and years and years and you've you're always messing around with it Do as is just very simple. It's not hard. It's not easy to mess up It's just just the way it is The last thing I want to actually cover before before I go is how do you remember to use do as because I mean Everyone's probably got pseudo as a muscle memory kind of thing. So what I'm going to do is I'm going to show you how to add a An alias so I'm going to open up my zsh now if you're a Bash user you'd want to open up your bash RC file if you're using fish you want to open up your fish RC fish fish Dot com file, I guess I think it's fish dot com But either way chances are if you've switched to a different shell, you'll know where your configuration file is Mine is a zsh RC file And what I'm going to do is just add an alias here alias and then pseudo equals do as and That's literally all I'm going to do here That's as simple as it gets that's how you would add it You can do the same thing like like I said in bashing fish. It's just an alias and this way when I go through and do Let's put this reopen up a Terminal if I do pseudo It's going to be the same thing. See she says I'm running do as here and I just do I Actually going to have to remember how to enter my password because I'm dumb and that's how you do it very simple and that way you're using do as every time and pseudo isn't being called on your computer now somebody's going to ask Can I remove pseudo from my computer? The answer is probably yes I'm sure there's a way to rip pseudo out of your computer and not have it on there bloated or whatever Don't do that You're gonna come across some application where do as does not work or maybe do as you know gets broken or whatever and You're gonna need pseudo now Do as is great because most recent fairly recently there was a pseudo like security flaw do as probably wouldn't have that But it's good to have both. I think now This is my opinion and there may not even be a way to remove pseudo But I'm sure there is I think you can remove pretty much anything from Linux that you want to use to remove But keep them both just in case you know pseudo doesn't hurt anything You just use do as because it's easier to configure and all that stuff anyways So that is it for this video if you enjoy this video give it a thumbs up if you didn't give it a thumbs down You can support the channel by subscribing Or by hitting the thumbs up or thumbs down button, which I've already told you to do or ask you to do I suppose You can also support the channel by like us liking us on Facebook or following us on Twitter And you can also support the channel by going to patreon.com slash the next guest And thank you for watching. I'll see you the next time