Switching between users

Now that we have several users on our system, we need to know how to switch between them. Of course, you can always just log in to the server as one of the users, but you can actually switch to any user account at any time providing you either know that user's password or have root access.

The command you will use to switch from one user to another is the su command. If you enter su with no options, it will assume that you want to switch to root and will ask you for your root password. As I mentioned earlier, Ubuntu locks out the root account by default, so you really don't have a root password. Unlocking the root account is actually really simple; all you have to do is create a root password. To do that, you can execute ...

Get Mastering Ubuntu Server now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.