I own a dell laptop configured with Win-10 Home Edition. For some project, I had to live boot Lubuntu v17.10.1 on it.

The issue is - while trying to get access to 'su account' I am unable to bypass it. It asks for a password, which I have no clue where to find.

I tried using the command - passwd Lubuntu, but it changed password of something else, and not 'su'.

How can I obtain password of 'su'?

  • In this case, use sudo passwd to set the root password if you really need to, but you should execute most commands that need superuser privilege with sudo. – Weijun Zhou Jan 30 '18 at 17:38
  • thanks @WeijunZhou, it worked. :) Also, will this technique of putting 'sudo' work for every command? – Manu Mathur Jan 30 '18 at 17:41
  • Not really by literally putting it before every command. You need to do a little bit work if you have redirections, but generally you can always achieve the goal with sudo without explicitly invoking su. If you need something similar to su, you can just do sudo -i. – Weijun Zhou Jan 30 '18 at 17:47
  • 1
    ok. thanks @WeijunZhou will keep this point in mind and will see its practical implication as well to better understand it. Thanks a lot. – Manu Mathur Jan 30 '18 at 17:48
  • @WeijunZhou: It would probably be better to post answer as answers, rather than comments. – dhag Jan 30 '18 at 19:03

Ubuntu assumes that the user should use sudo instead of su by default in their live images as well as their default installation. You can use sudo to do most tasks that can be done by su, but if you really need to change the superuser password, you can do

sudo passwd

This will prompt you for the new superuser password and you can set it. You can then use su as usual.

Alternatively, you can obtain a login shell by sudo -i, or a shell by sudo -s. Both of which give you a shell with superuser privilege. As for the difference between -i and -s, check the manpages.

  • 1
    Thanks a lot #WeijunZhou, #dhag and #AntonyGibbs for your responses. I have marked the right answer and the issue is resolved. Thanks for your assistance. – Manu Mathur Jan 30 '18 at 21:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.