This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How to change username & password of linux kernel

Hai 

I'm sekra,i'm using Beagleboard xm under linux OS.In that,i'm using TI's rootfs for the 2nd partition.It has username:root

I want to modify my username & apssword how do i change that,which file i want to modify that thing.

Thankyou

  • Hi Sekra,

    You could use commands like useradd or adduser for the new user and passwd for the password. This is generic Linux topic and you could search the Internet for guides how to configure this properly and according to your desires.

    Thank you.

    BR
    Vladimir

  • Hai Vladimir

    Thanks for the reply.Commands were fine.I know its working.But actually i want to how the commands working

    So i check the /etc/passwd file for that.Hence i changed the username( logname) and the password is encrypted here.How it works?i want to know that vladimir??

    my /etc/passwd file shows

    root:5tyerSW2gbmxjOWQ9i:0:0:root:/home/root:/bin/sh

     

    Please cud you refer this links:

    http://en.wikipedia.org/wiki/Passwd

  • Hi,

    On a linux machine, install makepasswd (sudo apt-get install makepasswd) 

    Then type : 

    echo "the_password_string_you_want" | makepasswd --clearfrom=- --crypt-md5 |awk '{ print $2 }'

    It will print you the encrypted password.

    Then copy this string to your /etc/passwd

    I should work

    Regards

    ADB

  • Hai

    i tried that thing in my linux desktop.so here my password is slander5.When i set that password,the encrypted would be differ as below,it shows in terminal.Is it right???How it could varies?its same same encryption technique or multiple encryptions were in linux.???

    lm@embapp-build:~$ echo slander5 | makepasswd --clearfrom=- --crypt-md5 |awk '{ print $2 }'
    $1$UB30avBE$0bzdR2HeIwo2U.Pi4NSoc1
    lm@embapp-build:~$ echo slander5 | makepasswd --clearfrom=- --crypt-md5 |awk '{ print $2 }'
    $1$b.WwkS3q$3IZRZCNr5Da7SlgPDma8a1
    lm@embapp-build:~$ echo slander5 | makepasswd --clearfrom=- --crypt-md5 |awk '{ print $2 }'
    $1$HiCb7u6G$LITUSjJWWFWjm.sjlGjvx1
    lm@embapp-build:~$ echo slander5 | makepasswd --clearfrom=- --crypt-md5 |awk '{ print $2 }'
    $1$31mpe1vJ$6y3hgIhF1e9XGortvOwGT.
    lm@embapp-build:~$ echo slander5 | makepasswd --clearfrom=- --crypt-md5 |awk '{ print $2 }'
    $1$5ytR/jL.$ZpfPBfSHlF0ILwquLcLaM0
    lm@embapp-build:~$

    Reply me.Thanks in advance

  • Hi,

    I do not know how it works in the background but It is normal as far as it generate a pseudo random key :

    http://manpages.ubuntu.com/manpages/dapper/man1/makepasswd.1.html

    Try, you will see that it works.

    Regards