User account and sudo?
Here are some tips that will help you out,
So, what happens when you install Ubuntu on your system is that you are prompted to make a user account.
Let’s say you made that account with some username and some password.
What Ubuntu does by default is that it makes your user as the ROOT itself.
Wait, you don’t know what a Guest, User, Root and Superuser are?? :P
Guest: Well. If you are logging in as a guest then you barely have any privileges, you can’t install any software, and your access is also restricted.
User: IF you are the one who installed Ubuntu, then this account is by default gave the administrative privileges by Ubuntu. So, the sudo command which actually can be used by the root user only, but since, by default, you have the administrative privileges you can run the sudo command just by confirming that you are the default user.
God damn it! Just enter your user’s password and the sudo command will work. (if you are the default user only!).
Q. What if you are not the default user?
Ans. Then you can’t run the sudo command until and unless you know the root password!
Q. But I know the default user’s login password, so will it work?
Ans. No. Well, you are not the root, and you don’t have the privileges the administrator has. And that password which you happen to know (the default user login password). It is not the root password.
Q. Then what is the root password and when are you going to tell me what is the difference between superuser and root!!?
Ans. First of all, Calm down, root and superuser are the same. And the root password is deactivated/locked by default, so you have to activate it. Next: you have to set up a root password yourself now, and I am here to tell you how. So relax. Just type (The default user can only do this):
$sudo su
It will prompt you for your user’s password. Enter it.
Then do:
$sudo passwd root
Enter your required root password and that’s it! You have activated the root password which was locked by default as the default user’s login password was sufficient; now you can log in from other account and get root privileges by providing this password.
Q. What is the difference between the su and the sudo command?
Ans. The su command is like the GOD command; it stands for Switch User.
i.e. su