Change Linux Username & Hostname

Sdílet
Vložit
  • čas přidán 26. 08. 2024
  • All my videos are for educational purposes with bug bounty hunters and penetration testers in mind CZcams don't take down my videos 😉
    🐦Follow me on Twitter = / phd_security
    📚 All My Courses = www.phdsec.com/
    🛍 shop merch @ merch.phdsec.com
    📖 Udemy Course = www.udemy.com/...

Komentáře • 105

  • @superkool7
    @superkool7 Před 11 měsíci +12

    brother. no joke, im pretty new into this world (stuck in tutorial hell rather), and i have to say - every single thing ive looked up - YOUVE HAD A VIDEO FOR. its amazing. thanks so much man. truly. EDIT: worked flawlessly, and in the best way (nothing broken!!!) Thanks again man!

  • @mellowgeekstudio
    @mellowgeekstudio Před rokem +13

    In usermod, the -d flag is the NEW user directory, it is not used to "override" the old user directory. The -m flag is used to move the old user directory contents to the new one (it does not have an argument). Then we have the argument of the whole command, kali, which indicates which user we are changing the name of. In the example given, the command should have been:
    "usermod -l ryan -d /home/ryan -m kali"
    That way, all the content inside /home/kali is moved to new user user directory /home/ryan, how it should be (user directory should have the same name as the user).

    • @mmvm98
      @mmvm98 Před rokem +4

      this right here is the way to do it

    • @cyberbhay
      @cyberbhay Před rokem

      ​@@mmvm98 bro i tried this command but it says 4:12 user is being used by process 769

    • @mmvm98
      @mmvm98 Před rokem

      @@cyberbhay did you reboot, not just log out?

    • @cyberbhay
      @cyberbhay Před rokem

      @@mmvm98 yes i tried it and it worked i was successful to change my hostname and by the i wanted to ask one more thing where can i find a legit way to change my username..... ⚡i recently installed kali linux so it's kinda new to me

    • @mmvm98
      @mmvm98 Před rokem +1

      @@cyberbhay for what i know there is no "legit way". maybe just crate a new user then. but this way in the video works, you just have to do what Mellow Geek replied instead of what he do in the video.

  • @jonathanowah7754
    @jonathanowah7754 Před 3 měsíci +1

    I've struggled with this for days. Your video helped me resolve it within minutes. Thanks.

  • @PS_Tube
    @PS_Tube Před 5 měsíci +1

    Simple and clean video Ryan. Thank you.

  • @SavageScientist
    @SavageScientist Před rokem +3

    this is a great video, i like how everything in linux is commandlinable.

  • @securesherlock
    @securesherlock Před měsícem

    Thank you so much! It works! I struggled for days, but yay!

  • @_nnNob0dy
    @_nnNob0dy Před 2 měsíci +4

    i get an "usermod: user is currently used by process 368" error. when i run ps there is no process with that id or whatever id it says. please help!

  • @raoultesla2292
    @raoultesla2292 Před rokem

    omFg, a simple, 0 loud crap music, step by step. this is so Novel. cheers

  • @Mr_Chr1S_0
    @Mr_Chr1S_0 Před měsícem +1

    Thank you so much, it helped a lot

  • @Hiroki_MakeGames
    @Hiroki_MakeGames Před 2 měsíci

    thanks i was doing it alone with the little knowledge i have and change something wrong and lost the user kali hahahha. thank god i ve created a second user if everything goes wrong . Great vid! new sub

  • @MohammedAlqaisi
    @MohammedAlqaisi Před 15 dny

    Why does this appear to me? I was tired trying to change the name. What are the steps or what should I do so that it does not appear to me?
    Usermod: user kali is currently used by process 1003

  • @patrik-kevinszucs4737
    @patrik-kevinszucs4737 Před 11 měsíci +1

    When is write sudo apt install gedit it says ‘E: Unable to locate package gedit’

  • @ricepeas42
    @ricepeas42 Před 4 měsíci +1

    Thanx, but what would my password be? Is it the one for the device?🙅🙅🙅🙅🙅🙅🙅🙅🙅

  • @Imenigmars
    @Imenigmars Před 7 měsíci +6

    Followed along and did everything the same way you did. hostname changed just fine, but after changing the username, i'm running into problems.the default login (kali, kali) no longer workds (as expected), but my new username/pass doesn't work. I can log into root with my new password and run sudo commands, but I can't login with the new username even though the password works with root and the username shows up on the list of users when I cat the psswdfile

  • @STEFFNAIRDROP
    @STEFFNAIRDROP Před rokem +3

    If you add how to enable root account it is very easy to beginners

  • @mus_music_
    @mus_music_ Před 29 dny

    when I am restarting it is giving me error "please remove the installation medium and then press enter" ?
    I don't have any installation medium like CD or USB? I installed it on local drive then Why ?
    can you please help me to resolve this issue ?

  • @NevinduSilva
    @NevinduSilva Před 11 měsíci

    Thanks a lot man. I changed my hostname and it worked.

  • @Ezekielbassey-xk9im
    @Ezekielbassey-xk9im Před 4 měsíci

    i followed through all of the instructions but i am sturk in host name in that final stage of changing the name i have i press the enter button but instead it enter another line

  • @prashishphunyal
    @prashishphunyal Před rokem

    thank god you reuploaded it

    • @ryan_phdsec
      @ryan_phdsec  Před rokem

      I made sure to test everything this time before I uploaded 🥴

  • @sxresh
    @sxresh Před 9 měsíci +1

    Error!
    Hostname: user kali is currently used by process 961 🤔

    • @booboo7504
      @booboo7504 Před 8 měsíci

      Same mines says 858 though?

  • @cyberluk3
    @cyberluk3 Před 4 měsíci

    Hey Ryan, great tutorial as usual. For some reason I have a space as such "username@ kali" . How do I remove that space? The space remains also when changing the user to root.

  • @gargisamara
    @gargisamara Před 13 dny

    Ouch...I'm gonna need a bit more specific guide.Yeah I'm trying to change the kali@kali: - part Linux Mint Cinnamon.
    Okay managed to change the part after the @. At 3:12 step now... can't manage to change the username /home/kali kali@ part... only hostname.

  • @Xerkies
    @Xerkies Před 5 měsíci

    Did what you said but after the restarting i its stuck on SDDM

  • @goldengoatfilms9059
    @goldengoatfilms9059 Před 4 měsíci

    Am I supposed to see a second IP address underneath the very first one ? If so I don’t have one to replace “kali” with my username ????😢

  • @pixelhead1
    @pixelhead1 Před 10 měsíci

    Thanks for the tutorial, everything works fine but there is one issue how can I change the name of the user directory in /home/from Kali to Myname.

  • @anilchaudhary7969
    @anilchaudhary7969 Před 5 měsíci

    How should I save download file or tool permanently in usb drive and i am using bootable USB live persistence i lost all File after reboot or restart

  • @shortsartits
    @shortsartits Před 5 měsíci

    This is a excellent video. Thanks Bro

  • @scotking3436
    @scotking3436 Před 3 měsíci

    I tried doing what you said after editing /etc/hosts as you show and restarting I could not login user root. Does root have a default pw? It's not kali or root or toor. Also, I have read that root is no longer a username with kali. Is that right?

  • @usaloverhardcore
    @usaloverhardcore Před rokem +3

    hey bro how did you get a phd for cyber security could you do a video about that the path and final paper

  • @googlelimp9834
    @googlelimp9834 Před 8 měsíci

    that dont work for me mate keeps popping up saying usermod: homedir must be an absolute path

  • @Lordvantine
    @Lordvantine Před rokem +2

    Error writing /etc/hosts : permission denied

  • @avalanchetqsterr9728
    @avalanchetqsterr9728 Před 11 měsíci

    I installed linux 2023.3 in cmd windows, when i entered i automatically had changed hostname, could that make a trouble?

  • @Tayariclashki
    @Tayariclashki Před rokem

    I am create one payload for Android but in it not connect with me
    Sessions are not generated
    What should I do??

  • @cherrievimemonis6226
    @cherrievimemonis6226 Před 8 měsíci

    thanks ryan it helps me alot im using parrot os

  • @cristobaldiazbarra1988
    @cristobaldiazbarra1988 Před 5 měsíci

    is there a way to change the password, because it stayed the same, it just changed the root password

  • @innohnakitare9834
    @innohnakitare9834 Před rokem

    can't operate failed to connect to bus host down what should I do

  • @shaynecode
    @shaynecode Před rokem

    trying again today, failed to change the username again

  • @taylorstephen727
    @taylorstephen727 Před měsícem

    When you are doing these videos give full steps not just clicking and then saying oh no didn’t means to do that…

  • @ur.yoshixo
    @ur.yoshixo Před rokem

    nahhh idk why i can't change my username, i did what u said and nothin... bro why?

  • @Skyhex19
    @Skyhex19 Před 10 měsíci

    I guess this doesn't work anymore

  • @BriaTech
    @BriaTech Před 4 měsíci

    Something he didn’t make clear was the password. You either put in root or kali

  • @tuturu9419
    @tuturu9419 Před 11 měsíci

    I cannot save my hostname 😢 when i click control + o and then enter it says "file name to write /ect/hosts..../ and its waiting for me to type something that i dont know..
    Pls someone help im new to kali

  • @alhusseinalseelawi979
    @alhusseinalseelawi979 Před 8 měsíci

    man i fucked it up at first but managed to fix it thx

  • @kcvrx
    @kcvrx Před 4 měsíci

    the goatttt

  • @Tutieboyron
    @Tutieboyron Před 10 měsíci

    Thanks for the help

  • @parthkrishnatripathi9965
    @parthkrishnatripathi9965 Před 3 měsíci

    Username is changed and thanks a lot for that but how to change the password also

  • @shaynecode
    @shaynecode Před rokem

    was able to change the host name but unable to change username

    • @ossi5338
      @ossi5338 Před 11 měsíci +1

      Same issue bro...

  • @repairstudio4940
    @repairstudio4940 Před rokem

    Nope. No dice.

  • @cyborg-gang
    @cyborg-gang Před rokem

    Thank you sm !!!

  • @AldiyesPaskalisBirta
    @AldiyesPaskalisBirta Před 5 měsíci

    thanks for help

  • @GrantCCR
    @GrantCCR Před rokem

    hey im really new to kali and wanted to know how do you apply what you entered in the "/etc/hosts" cause when I save modified buffer i dont know what to do from there

    • @berlin1019
      @berlin1019 Před rokem

      press enter

    • @lind-hw6qo
      @lind-hw6qo Před rokem +1

      You press ctrl o then enter to save and then ctrl X to exit

    • @luyandaphetha7008
      @luyandaphetha7008 Před 10 měsíci +1

      ​@@lind-hw6qothis comment saved me from almost deleting and starting over😂

  • @learnlinuxwithmellwm
    @learnlinuxwithmellwm Před rokem

    User Kali is currently used by process 733 😭

  • @ibrahimabdeltawab6418

    Thanks so much

  • @PankajSINGH-rn1rh
    @PankajSINGH-rn1rh Před rokem

    Thanks sir ❤

  • @techlightbangla6755
    @techlightbangla6755 Před rokem

    Thanks

  • @abdullahziauddin6008
    @abdullahziauddin6008 Před rokem

    When i try to change the user name it says user kali is currently used by process 1036 and when i kill that process it redirects me to the login page of kali linux and it happens again and again plz help..

    • @ryan_phdsec
      @ryan_phdsec  Před rokem

      Did you reboot your vm and login as root?

    • @abdullahziauddin6008
      @abdullahziauddin6008 Před rokem

      @@ryan_phdsec i have tried it multiple times but it didnt workout so i deleted the kali machince and reinstalled 😂 because i was facing errors while using commands like git clone apt update etc

    • @kaiyuVFX
      @kaiyuVFX Před rokem +1

      @@abdullahziauddin6008 i had the same issue. its because you logged in with "kali" username. it cant edit itself while logged in to itself. you have to log into kali with username "root" then run the command

    • @bagas5425
      @bagas5425 Před rokem

      @@kaiyuVFX how to login as root? What's the password for it?

    • @an0nbil
      @an0nbil Před rokem +1

      ​@@bagas5425write
      passwd root
      Enter a password and hit enter
      After that logout out and login and enter root as username and enter the password u entered when u did passwd root command and u will login as root
      Hope u find it helpful 😊

  • @hashemmegdadi
    @hashemmegdadi Před 11 měsíci +1

    How to save it win i wite (phdsec.localdomain phdsec ) because i dont press esc with all keyboard?!!??

  • @shaikabdulbasha8248
    @shaikabdulbasha8248 Před rokem

    Dear Boss
    Upload for video
    For aviator casino hack

  • @desiredolive9834
    @desiredolive9834 Před rokem

    Sir, have the this command but mind is not changing, please what should I do, Am confuse .

  • @razmjumehdi9069
    @razmjumehdi9069 Před rokem

    👌

  • @pottanporinju
    @pottanporinju Před rokem

    ꜱᴛɪʟʟ ɴᴏ ᴄʜᴀɴɢᴇ ɪɴ ᴘᴀꜱꜱᴡᴏʀᴅ ᴀɴᴅ ᴜꜱᴇʀɴᴀᴍᴇ

  • @JJGal
    @JJGal Před 3 měsíci

    czcams.com/video/VM64fH6tEEU/video.html from right here how do you even save the modified file? you didnt show that.
    Edit: you used shortcut keys and you really should of showed that for the beginners. When entering the usermod command i get this " Usermod: user kali is currently used by process 1041" still struggling its amazing how hard it is to change a username and password.

  • @iborgodwin8407
    @iborgodwin8407 Před rokem

    I couldn’t change passwords following your steps

  • @tuturu9419
    @tuturu9419 Před 11 měsíci

    Eroor writing /ect/hosts: no such file or directory
    pls help - new to kali

    • @listocastillo6453
      @listocastillo6453 Před 5 měsíci

      U probly relocated or removed some host files, just locate were they are and write the command to that.

    • @caseyconklin8066
      @caseyconklin8066 Před 3 měsíci

      change to /etc/hosts, typo

  • @nabilatsabitah95
    @nabilatsabitah95 Před rokem

    Berukkkkkkkkkkkkk

  • @Sanz-cg1vs
    @Sanz-cg1vs Před rokem

    how to fix this???
    usermod -l hex_xploit -d /home/hex_xploit -m kali
    usermod: user kali is currently used by process 751
    I cant change that

  • @RakeshDas-ef3nt
    @RakeshDas-ef3nt Před rokem

    please tell me the way how you saved the file after you wrote {phdsc.localdomain phdsc} iam stuck there

    • @ryan_phdsec
      @ryan_phdsec  Před rokem

      I you are using gedit you can just hit command S to save or exit and it will ask if you want to save

  • @falankuk
    @falankuk Před rokem

    Hi thanks for the video I get this message..... "┌──(root㉿max)-[~]
    └─# usermod -l max -d /home/kali -m kali
    usermod: user kali is currently used by process 1028......what does it mean?

    • @ryan_phdsec
      @ryan_phdsec  Před rokem

      you need to restart your vm and sign in as root

    • @falankuk
      @falankuk Před rokem +1

      @@ryan_phdsec Hi thanks for your reply, once I am in the root terminal and I use the following command "usermod -l max -d /home/kali -m kali" I get this message "┌──(root㉿max)-[~]
      └─# usermod -l max -d /home/kali -m kali
      usermod: user 'kali' does not exist......but when I boot the VM back I cannot sign with max I have to do it with kali, I have been able to change the password but I can't change the username, but root is telling me that I signed on with max (see above), after I tried to use the following command "groupmod -n max kali"
      ──(root㉿max)-[~]
      └─# groupmod -n max kali
      groupmod: group 'kali' does not exist
      again is telling me, it does not exist....

    • @MFadilan
      @MFadilan Před 6 měsíci

      @@falankuk I also faced the same issue. How do you fix that😢?

  • @arters1672
    @arters1672 Před rokem

    Thanks