Saturday, October 15, 2016

Disable User Login (Lock Password) on Linux

To lock a user account on linux, you can use the passwd command.

The command is,

sudo passwd -l username

For example, to lock the user 'linda', so 'linda' can not login to the system anymore,

sudo passwd -l linda
Locking password for user linda.
passwd: Success

Now you can try to login as 'linda' and you will see that you login is disabled.

Display Information About User Password on Linux

To display password information ie.

  • password expire date
  • if the password is active or not
  • the number of days after the account expires
  • minimum number of days between password change
  • maximum number of days between password change
  • how many days to give warning before the password expires

The chage can be used like this,
chage -l username

For example, chage -l shovon
Last password change     : Oct 09, 2016
Password expires     : never
Password inactive     : never
Account expires      : never
Minimum number of days between password change  : 0
Maximum number of days between password change  : 99999
Number of days of warning before password expires : 7



Thursday, October 13, 2016

See The Users that have Running Processes on Linux System

Hi,

Today I am gonna write about how to see the users on your Linux system that are running some processes.

I have a YouTube video about this post. Check it out if you wish.

YouTube : See The Users that have Running Processes on Linux System



The command is,

sudo ps aux | awk '{print $1}' | sort | uniq | grep -v USER

Explanation

sudo ps aux is used to list the running processes of the system.

awk '{print $1}' is used to print only the first column from the output of sudo ps aux

sort is used to sort the output.

uniq is used to get only the unique lines.

grep -v USER is used to remove the line that contains the field name USER.

Thank you for the visit. :-)

Sunday, October 9, 2016

Generate Simple Relatively Easy to Remember Passwords using pwmake on Linux

To generate simple easy to remember passwords on Linux, you can use pwmake command. If you like to watch videos to learn then I got a YouTube video about this blog at Youtube: Generate Simple Relatively Easy to Remember Passwords using pwmake on Linux.

pwmake command accepts one parameter, that is an entropy. The entropy determines how hard the password is to crack. Simply more entropy means more security.

The minimum entropy value you should use is 56, but you can change it to anything you need.

You can install pwmake on Ubuntu using the following command.

sudo apt-get update
sudo apt-get install libpwquality-tools cracklib-runtime

Let's generate a simple password. Run the following command.

pwmake 56
Ytuq1yx-ilUl

The command returns Ytuq1yx-ilUl, a 12 character password. This is the output I got, the output you will get will definitely be different.

Now, let's generate a more secure password

pwmake 128
@tm0SOnrAf3vUpRuN4x&4ssAtry

That's a long password.

Anyway, I hope you got the point.

Thanks for vising my blog and happy Linuxing :-D

Friday, September 9, 2016

Make LinuxMint 18 - Sarah Bootable USB Drive using Windows and LiLi


Make LinuxMint 18 - Sarah Bootable USB Drive using Windows and LiLi


Step 1:
Download LiLi from (http://www.linuxliveusb.com).

Step 2:
Install LiLi

Step 3:
Insert your USB drive

Step 4:
Open LiLi


Step 5:
On the LiLi window, click on ISO/IMG and select your iso image.


Step 6:
Theres two options that you might be interested in,
a) Format the key in FAT32 (this will erase your data!!)
b) Hide created files on key

Option(a) removes everything from your usb drive, and Option(b) hides linux system files on the drive, so you won't see linux installation files in it. You hide files when you plan on keeping other important files on your usb drive along with a Linux installer.


Step 7:
Click on the lighting button and wait.

Step 8:
Enjoy.



If you want to see how it's done, you may watch on YouTube
Watch on YouTube

Thursday, September 8, 2016

Make LinuxMint 18 - Sarah USB Bootable Drive using Ubuntu


Make LinuxMint 18 - Sarah USB Bootable Drive using Ubuntu




Step 1: Go to the terminal.


Step 2: Type '   /dev/sd*   ' to see the device identifier of your usb drive. it should be something like /dev/sdb /dev/sdc. In my case it's '   /dev/sdb   '


Step 3: Type 'dd if=Location_of_Your_ISO_image.iso of=/dev/sdb bs=4096'. I have Linux Mint iso on my Downloads folder.

    sudo dd if=./Downloads/linuxmint-18-cinnamon-64bit of=/dev/sdb bs=4096  



Step 4: Wait


Step 5: Once it's done, enjoy.




You may watch how it's done on youtube. Please subscribe my channel if you do like it. :-)
Watch on YouTube

Wednesday, July 6, 2016

Boot Linux from GRUB2 Command Line Interface (CLI)

To boot your linux system from the grub command line, you only need 3 commands. It's simple.



Step 1: Set the 'root' variable


If your linux system is on the first partition of your first hard drive, you would type,

set root=(hd0,1)

If your linux system is on the second partition of your first hard drive, you would type,

set root=(hd0,2)

If your linux system is on the first partition of your second hard drive, you would type,

set root=(hd1,1)

and so on.



Step 2: Set the linux kernel path

Type the following command,

linux /boot/your_vmlinuz_file root=/dev/sda1

You can press the tab key, the grub CLI will autocomplete everything for you.

Remember, here you also have to specify the root filesystem. If your linux is installed on the,

first partition of your first hard drive, root=/dev/sda1

second partition of your first hard drive, root=/dev/sda2

first partition of your second hard drive, root=/dev/sdb1


and so one



Step 3: Set the initrd file path

Type the following command,

initrd /boot/initrd_file_path

Step 4: Boot

Now type the following command and enjoy. :-)

boot

On my system(Debian 8 Jessie), I executed the following commands to boot from the grub CLI.

set root=(hd0,1)
linux /boot/vmlinuz-3.16.0-4-amd64 root=/dev/sda1
initrd /boot/initrd.img-3.16.0-4-amd64
boot


Thanks for the visit and Happy Linuxing :-)