Tuesday, December 29, 2020

Take 2: sudo

 Take 2: sudo

I – Adding a user to the sudo group

  1. Start becoming superuser with su. Enter your root password.
  2. Now, install sudo with
     apt-get install sudo.
  3. Debian 10: add the user account to the group sudo with 
    /sbin/adduser username sudo.
     Where username is your user account.
  4. Now, log out and then log in with the same user.
  5. Open a terminal and run 
    sudo echo 'Hello, world!',
    enter your user password and that's it!

II – Adding an existing user to the sudoers file


The sudoers file is located at /etc/sudoers.

This file contains a set of rules that are applied to determine who has sudo rights on a system, which commands they can execute with sudo privileges, and if they should be prompted a password or not. 

However, you should never modify the sudoers file with a text editor.  Saving a bad sudoers may leave you with the impossibility of getting sudo rights ever again.

Instead, use visudo, a tool designed to make sure you don’t do any mistakes.

$ sudo visudo

This is what you should see.

The sudoers file on Debian 10 Buster

At the end of the file, add a new line for the user.

john       ALL=(ALL:ALL) ALL
Sudoers syntax on Debian 10

By default, the account password will be asked every five minutes to perform sudo operations. However, if you want to remove this password verification, you can set the NOPASSWD option.

john       ALL=(ALL:ALL) NOPASSWD:ALL

If you want the password verification to be skipped for longer periods of time, you can overwrite the timestamp_timeout (in minutes) parameter in your sudoers file.

# /etc/sudoers
#
# This file MUST be edited with the 'visudo' command as root.
# See the man page for details on how to write a sudoers file.
#

Defaults        env_reset
Defaults        mail_badpass
Defaults        secure_path = /sbin:/bin:/usr/sbin:/usr/bin
Defaults        timestamp_timeout=30


Take 1

 Take 1: VMware and DVD ISO images

After downloading the 3 DVD’s that make up a full install of Debian, I created a new virtual machine with a 60GB hard drive.  The virtual machine was given the .ISO file of the 1st DVD, and booted.

Installation went well, until the 2nd DVD was requested.  I changed the .ISO file the virtual machine had mounted, but for some reason this was not detected.  As a result, I suspect the install was incomplete.  This suspicion was compounded when functions like sudo failed to work.

Through manual fiddling, I got this to work eventually, but who knows what else is wrong? As a result of this, I plan to re-image the virtual machine, using a LiveCD.


Tuesday, December 22, 2020

In The Beginning...

 In The Beginning…

How far do you go to prove a point?
What if, in proving it, you learn some new skills?

In a psychology class, long ago, the lecturer made a claim that just sounded ridiculous.  “Every building that’s taller than it is wide, is a penis.  Every building that’s wider than it is tall, is also a penis – lying on it’s side”.

I was reminded of this when watching a comedy show, “How I Met Your Mother”.  One character had plans for a new building, that apparently reminded everyone of a penis.  One character even commented that, by trimming the bushes at the base, it could be made to look taller.

This got me thinking, and I had an idea: two skyscrapers, shaped like a pair of woman’s legs. One would have a radio antenna at the top, and be designed to look like the heel of a stiletto shoe.  Tacky and tasteless, for sure.  However, it would go to show that not all buildings are a penis.

So, how to create this building?  The logical (free) software is – Blender. If any standard graphics is also required, the (free) program Gimp would help, too.  Since both these applications run under Linux, why not use this as an exercise in setting up a Linux environment, too? 

And so we reach the target goal: Setting up Gimp and Blender, on a Debian Linux Virtual machine in VMWare.