Skip to end of metadata
Go to start of metadata

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

2. Setting up sudo user on your VM

After installation of the VM, all actions are required to be done through Super User DO - SUDO which acts on behalf of ROOT user

 

1 > Step-by-step guide

  1. create username - password for ROSE server for BLUELIGHT admin
  2. open oracle VM virtualbox manager
  3. click on " new"
  4. Create " name " for the machine , choose type of OS , usually " linux " , choose version type, usually " debian 64 bit ". Click " next"
  5. Allocate RAM - minimum 512 mb = if you make it a fixed setup, the RAM and HD space allocated will not be available for the Machine anymore.
  6. Create new Virtual hardisk, you can name it and allocate space not less than 8 Gb
  7. you will need to find or install an ISO of the operating system eg - debian on the System harddisk or you can boot from a OS dvd
  8. Once the OS is loaded on your virtual machine, you need to install it
  9. Choose language of installation – then choose the timezone of the country you are operating from
  10. Choose the keyboard style - american english
  11. Choose host name = usually you can choose a single word to identify you in the network, best practice to check with Network admin before choosing name
  12. Choose host domain name = bluelight.av
  13. Setup the ' root ' password carefully,and note it down .  it is the super admin for your VM
  14. Create Username to use by system to address you in all communication and will also be the log in username that you will use. It has to start with a lowercase alphabet
  15. create a password for this new username
  16. Installer will ask you to partition disk , normally seting up LVM is good practice but for start you can just choose set up entire disk.
    these options can be modified in future.
  17. As a new user if you are unsure how to partition you new Disk space , just choose all in one option
  18. Go ahead , confirm the partitioning of Disk
  19. Choose a mirror for installing debian , it will connect with its online resource, best country to pick is"  Russian federation "
  20. select debian archive mirror, because you have selected russian as country : choose : ftp.ru.debian.org 
  21. HTTP option can be left blank
  22. Choose " no " to participate in usage survey, you can activate it later also
  23. Software selection, you can choose all the softwares you are aware of, incase you do not know, just choose GNOME which is a standard graphical interface which you will require
  24. Get ready for a long wait ... an hour maybe
  25. Choose yes for GRUB boot loader
  26. Select the path defined for installing the GRUB boot loader rather than manually defining
  27. Now the installation is complete, enter the password for the user you have created and start accessing your new VM

 

2 > Step-by-step guide to create SUDO user

  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.