change kali linux password code example
Example 1: linux change username
# login as root and make sure that there are no active processes for user
usermod -l NEW_USERNAME OLD_USERNAME
# if user is running kill user w the following command
userUID=$(id -u OLD_USERNAME) && pkill -U $userUID
Example 2: how to change password in linux
# sudo passwd <username>
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully