Advertisements

Managing users and passwords (for GNU/Linux, FreeBSD and other UN*X/UN*X-like images)

Many users (especially those who are new to UN*X-like operating systems) ask theirselves how they can manage users in their newly downloaded virtual machines.

While we can’t (and won’t) replace a thorough read of your favourite manual, here there are several things you might find useful. Note that:

  1. On UN*X and UN*X-like operating systems “there’s more than a way to do it“;
  2. When we have to choose among those ways, we prefer using a command line 😀

Seriously: nowadays, you will surely find different graphical tools to manage users and password for each flavour of the operating systems you choose to try; we would like to assist you in using each of them, but we would be taking time out of creating new images – and, you know, time is a fat resource constraint in volunteer-only projects. On the other hand, command-line methods tend to stay the same.

1) Changing the default password for the root user

Maybe that’s the first thing we would be doing if we wanted to use a virtual machine for something other than toying.

Suppose that the default password for the root user in the virtual machine is toor (we set it to that most of the time, but refer to the information next to the download link to be sure).

  1. Login using root as username, toor as password.
  2. If the image provides a graphical environment, go and search for a “Terminal”, “Terminal Emulator”, or “Console” and click to open it. There’s always one. 🙂
  3. Type passwd, then press ENTER.
  4. Type a password of your choice, then press ENTER.
  5. You will be asked to repeat your password, retype it and press ENTER.

That’s all there to do it. 😀

2) Changing the (default) password for the (root) user

The brackets in the title means that this applies even if the password you want to change is not the default one, and even if the user is not root.

The way we’ll present here IS NOT the best, but is the most similar to what you’ve seen in 1) so you shouldn’t have much troubles. Suppose that

  1. Login using root as username, and the password you’ve chosen for it in 1) (if you did) as password.
  2. If the image provides a graphical environment, go and search for a “Terminal”, “Terminal Emulator”, or “Console” and click to open it. There’s always one. 🙂
  3. Type passwd myusername, then press ENTER.
  4. Type a password of your choice, then press ENTER.
  5. You will be asked to repeat your password, retype it and press ENTER.

Done.

Advertisements
%d bloggers like this: