UserMaatis a nicelittlecommandallowsyoutodothingslikehas a lockuseraccount.
Sothatmightbeusefulforyouthat I'm goingtoshowyouhowtodelete a userandthenwontheimportantthingsthatcleanuptaskis.
I'm goingtoshowyouhowtoremovethreeuserprofiledirectorythatiscreatedwhenLennoxcreates a profiletobeginwith.
Thisisoneofthoseimportantthingsthatagain, thiscouldbecomeoneofthosemaintenanceissueswhere, whenyoucreate a useraccountLennoxitcreates a folderfortheprofileintheHomeDirectorywithalltheprofileinformationoneoftheweirdthingsintheLenoxworldkindoflikenotreallysurewhythathappens, I supposethatthere's a reasonisthatwhenyoudeletetheuseraccount, itdoesn't evengiveyouanoptionfordeletingthatprofiledirectory s.
Soyousimplyhavetogoandthenactuallyremovethedirectorymanuallytomakesureyoudon't getboggedupwith a wholebunchofolduserdirectoriesthataren't ofanyvalueanymore.
Soyoureallyshouldn't runintoanyissuesifyou'reusing a differentversionofthe U Bahntoserveroperatingsystemsothat I'm not a login a semimadeaccountthat I'vebeenusingishisaccountcalledBobandthepasswordis 123456 becausethat's whatmakesmylifebetterwellagainonwegetthenormalscreen.
Sowhat I'm goingtodois I'm gonnadocleartoclearthescreensothatwegetbackto a blankscreen, eh?
Sothefirstthingthat I wanttodohereis I'm goingtodoanaduser.
Therestofthisisbasically a littlehousekeepingthings.
Soyouknow, ifyou'rebuildingtheserverontheseuseraccountsoractualemployeesinyourcompany, youmaywanttoplugininformationhair, buthonestly, again, ifthisissimply a Webserver, andyousimplyneed a coupleofuseraccountsinordertodo a differenttypeofmaintenancetasks.
I wouldarguemoreorlesstoleavethisblank, butwecandogohere.
Ifyoudocreate a useraccountforthingslikeserviceissomethinglikethatinthisotherhere, youmightactuallywanttojustput a commentofHey, thisuseraccountwascreatedforemailserviceissomethinglikethat, becausethatthatcouldbeusefulagain.
Onethingyouhavetoberememberingwheneveryoubuild a Lennoxsystem, wheneveryoubuildanythingforinfrastructure, it's notaboutyou.
Maintainyou.
It's notaboutwhetheryoucanmaintainit a yearortwofromnow.
So I'm gonnaopenuphisreadonlyesoforwardslashforwardslashistherootdirectory.
E T.
C.
Isthefolderunderrouteon.
Thenthere's a filecalledPastthat P a s s w d.
Because, ofcourseitisstheycan't justmake a passwordfile.
Don't beridiculousonthen.
We'regoingon.
Soweopenthisup.
Hey, hey.
Wegot a wholebunchofevermakingherethatprobablylookslikegobbletogivetoyou.
Buttheseareinfact, alloftheuseraccountsthatarecurrentlyonthisOlynyksystem, anditgivesyousomeinformationabouttheseaccountsandagain, oneofthingsyou'llnoticeisDamonbeenInsistsgames L P news, right.
Soyougiveoneuseraccount a wholebucketpermissionsagain, thatwholethankyou.
Oneuseraccountroutepermissionsto a server.
Andthenif a hackercancompromisethatonerouteaccount, theybasicallyownedtheserver.
Uh, thesameistruewithgiving a useraccountslesserlesserpermissions, right.
IfyougiveoneuseraccountpermissionoverFTPandpermissionoveryouknowSMTPandpermissionover a numberofdifferentthingsthatif a hackercancompromisethatoneaccount, thennotonlydotheygetaccesstoFTP, buttheyalsogetaccesstoSMTPandtheymightgetaccesstomysequelandtheymightgetaccesstoenoughthingsthattheycanthenhackaroundandgetaccesstothewholesystem.
Soifyoucreatespecificaccountstodospecifictests, thatisonewaytotryandmakethesystem a littlebitmoresecure.
Here, letmeget a p a s s w o r d p a s testofyou o r d passwordupdated.
Successful.
Well, thereyougo.
Sonow I canusemypassword, passwordesoagain, theseairthelittlestupidthingsthatyoucanrunintotheLenoxworld, Thatisthatis a lessonforyouthat I wasn't expectingtogiveyou.
Sogetsomethingthatyoumayruninto.
Sothethecommandinordertochangeyourownpasswordis P A s S W D.
Andsowhenyoutake a lookatitforusage s o youhaveusermod, thenyouputinoptionsthanyouputinlong.
Sohowthisnormallyshouldbe a sudiousermodAndthen, youknow, hyphenSeehyphen d hyphen e putalltheoptionsinthere, andthenyouput a logininformation.
We'renotgonnaworryaboutthatrightnow.
Oneofthings I didn't wanttoshowyouwiththeusermoncommandedthat I dothinkisinterestingandsomethingthatyoumightwanttolookatisyoucanactually a walktheuseraccount.
Andjustagain, onethoserandomthingstothinkaboutwhetherornotyouusethemveryoften, sothatletusclearthescreenagainand I willshowyouhowtoactuallygoaboutdeletingusers.
Andso, fromhere, allwehavetodioiswe'regonnadelete a 10 user.
Andsowelookattake a lookatthisandwe'recurrentlyloggedinasBobatserver.
Andsowhatwe'regonnadoiswe'regoingtodeletethe 10 useraccountwedois D E l userandthenwhoeveritis 10 pseudodeluserTim, Thenwe'regoingtohitinnerremovingTimWarningGroup 10 Timhasnomoremembersdone.
Sobasically, nowwthitouseraccounthasbeendeleted.
But I wanttoshowyousomethinghere.
SoletmedothePWDcommandtoshowuswhereratwhen a changedirectory, I'm goingtogouptothehomedirectoryand I willdo l s hellandlistthedirectoriesthatarestillupinthehomedirectory.
Soifyouwereinterestedaboutthedifferentthingsthatyoucoulddowithuseraccounts, youcangowhenyoucantake a look.
Oneofthethingsthat I wouldwarnyouaboutagainintherealworldofLennoxisreallyaskyourselfifyouwanttobecreatingLennoxaccountsfromthecommandlineoryoudoyouwanttousesomeothertypeofsoftwareinordertocreateuseraccountsagain?
I wouldarguethat's probablywhatyou'regoingtodoattheendoftheday.
Threeideabeingisthoseadditionallayersofsoftware.
Whenyouadd a useraccountthere, theymayadduseraccounttothepasswordfileandLennox, butthey'llalsodo 20 otherdifferenttasks, right?
Youcreate a useraccountinsomeorsomethingelse, andnotonlydoesitcreate a useraccount, butitalsocreatesanemailaccount.
Andalsodoesthis.
DoesthisDoesthisdoesthisdoesthis?
Andsothatis a moreeffectivewayofdealingwithuseraccountsandLennoxinfrastructurethansimplyaddingusersatthecommandline.
Butthiscanbeveryusefulagainfrom a securitystandpoint, creatinguseraccountsthatitcanonlydospecificthingswithintheLenoxoperatingsystemthatcouldbevaluableorifyou'replayingaroundanddoingotherthings, likepossiblylikeifyoucreateanFTPserver.
Don't That's somethingthatyoumightdowith a commandlinecreatingusers, deletingusers.
Butgenerallyyougenerally I wouldnotbecreatingcreating a lotoftheuseraccountsagainfromthatinfrastructurestypestandpointjustfromthecommandline.
Sothat's justsomethingtokeepinmind.
Butreally, that's allthereistoitagain.
AndaddUser, yougotthepassword P A S s W D.
Command.
Sowiththatcommand, youcanchangeyourownpasswordoragain, ifyou'reloggedinastheroute, youcouldchangepasswordsforotherusers, E T c slashpassword P.
A s s W D filethatcontinuestheinformationforallyouruseraccountssoyoucangothere, seealltheuseraccountsthatareonthesystem.
Youcanseeallofthat.
Itisadditionalinformationagain, I wouldsay, Reallythinkaboutwritingnotesfororcommentsforwhyyou'recreatingspecificuseraccountsthatthatcouldbeusefulwhenyougobacktotrytocleanup a systemagain, imagineOlynyksystem.