A good way to list valid users in the /etc/passwd file on Linux.

This one-liner will display all users with UIDs over 999 and under 2000. This includes valid users on an Ubuntu system but may be different on other machines. ┌──[[email protected]]─[~/Documents] └──╼ ╼ $ awk -F: ‘{if($3>999 && $3<2000)print $1,$3,$6}’ /etc/passwd jason 1000 /home/jason kirk 1001 /home/kirk┌──[[email protected]]─[~/Documents] └──╼ ╼ $ awk -F: ‘{if($3>999 && $3<2000)print $1,$3,$6}’ /etc/passwd … Read more

Adding your user to the sudoers file on Debian.

If you want to be able to use the sudo command in Debian to do superuser tasks as your normal user, then you need to edit the /etc/sudoers file to be able to perform administrator tasks as a normal user with sudo. Add the user lovecraft to the sudoers file like this. lovecraft ALL=(ALL:ALL) ALLlovecraft … Read more

Get information about users on your Linux system easily.

A Linux system can have a lot of users in the /etc/passwd file. But it is easy to keep track of your users with the command line. The lslogins command will print a listing of known users on your Linux system. An example of the usage. jason@jason-Virtual-Machine:~$ lslogins UID USER PROC PWD-LOCK PWD-DENY LAST-LOGIN GECOS … Read more

Very useful and informative Linux commands.

While running Linux, if you want to list the contents of a folder in a vertical list format, just use the ls command with these switches. jason@ubuntu:~$ ls -luh –color=yes total 48K drwxr-xr-x 2 jason jason 4.0K Dec 15 03:03 Desktop drwxr-xr-x 2 jason jason 4.0K Nov 29 17:00 Documents drwxr-xr-x 2 jason jason 4.0K … Read more

How to edit user accounts on Linux Mint with the usermod command.

The usermod command offers the Linux user the ability to edit user accounts or lock out a user as well as changing the users login shell. Here I am editing the comment about the user “hoshi”. adeptus-mechanicus ~ # usermod -c "New user" hoshiadeptus-mechanicus ~ # usermod -c "New user" hoshi This command parameter changes … Read more