$ passwd ExplanationCopy hashed password form /etc/shadow and user "ubuntu" to root password the idea is to make the password of the user ubuntu to be the same as root. ubuntu is the username so if you want to be on your specific user you need to change it. here is the command : 'sed -i "s|root:*|root: use ` (the sign ~ without shift) before cat and ` after '{print $2}' root:* search for specific string "root:*" ^ubuntu -username cat /etc/shadow |grep ^ubuntu | awk -F':' '{print $2}' - takes the password LimitationsWorks ONLY IF root DOEASN'T have PASSWORD and in the file is like this root:*: ../doeasn't matter/ |