Child pages
  • 1. Setting up Virtual Box

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. while installing the VM, the installer would have prompted you to create 2 unique users, one was ROOT ,and other normal user
  2. When you log in to the VM for the first time, you always log in as normal user, and ROOT user is something you have to activate via the terminal.
  3. Being logged in as ROOT and performing mundane task is no advisable, hence the SUDO user exist.
  4. In order for a user to run SUDO, the user must belong to group=SUDO.
  5. if you give root an empty password during installation, SUDO will be installed and the first user will be able to use it to gain root access (currently, the user will be added to the SUDO group).
  6. If not, then normal user must log into the ROOT user and then create a SUDO user
  7. As a normal user id = username , you can enter ROOT profile by giving
    command : su
    It will then ask you for your ROOT password, after giving the correct password the prompt of the terminal will change
    username@computername :~$
    to
    root@computername:/home/username#
  8. Now you are logged in as ROOT, to confirm you can pass the command, # groups
    and as output it would display root , and hence you are sure.
  9. As a ROOT you can either create a new user and add it to sudo group or add existing user to sudo group
  10. To create new user, use command,
    adduser newusername
    The terminal will add a new user id : newusername and prompt you to create password and verify password
    The terminal will then immediately create a home directory for the newusername and ask for other details like,
    Fullname : Address: Home Ph: Office Ph: and prompt you if the info provided is correct ,
    As soon as you verify the info is correct, you new user is created. To access this new user you must exit the ROOT terminal and exit session. The groups are allotted on at the time of session start, So log out and log in as newusername
  11. Once the new user is created we can assign it to SUDO group or can assign existing users to access SUDO group
  12. To give add user to SUDO group, log into ROOT user using ~$ su  command and then give command
    # adduser newusername sudo
  13. Once the terminal has added the newusername to SUDO group, it will say done.
  14. It is important to note, the user must log out completely and log in again, as the groups are assigned to users only on log in
  15. now as newusername when you give command ~$ groups it will give back result,
    newusername sudo
  16. this confirms newusername is now SUDO and thus it can create new user on behalf of the ROOT user.
  17. incase even after adding to the sudo group if the user does show sudo ifconfig , then it means, that you first need to install sudo on to the system before adding users to sudo group.
  18. To install sudo, log in to root user using su command, and then give command :  apt-get install sudo
    *  make sure the iso of the debian is mounted
  19. After sudo is installed successfully, while still in root user, give command visudo
  20. In the visudo panel, in user privileges section, add your user name below root and give privileges ALL:ALL ALL 
  21. Now exit root and as user give command sudo ifconfig , if the systems accepts your command, it confirms the sudo user is created.

When setting up a virtual machine as new workstation for yourself.