Very useful Linux tips for getting information on current logins.

There are many ways to get detailed information on known users on your Linux system. The lslogins command is therefore very useful for listing all usable login accounts. The below example will list all user accounts including the root account. This might be disabled on an Ubuntu system, but it is worth listing it anyway. … Read more

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

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

Manage your user settings easily on Linux Mint or Ubuntu.

Managing your user account on Ubuntu or Linux Mint is very easy with the GUI utilities provided. Under System->Administration->Users and Groups, you have the option to create new user accounts, or modify existing ones. This is the window above, it is ready for the creation of new user accounts. Click any option, and it will … Read more

Understanding the /etc/passwd file on UNIX/Linux.

The /etc/passwd file on UNIX/Linux is where the user accounts for Linux are stored. This keeps your system safe as the passwords are stored as hashes in the /etc/shadow file, which is separate from the passwd file and is only accessible by the superuser. This keeps a system very safe. Red Hat Enterprise Linux uses … Read more

How to create a new user on Linux and add a password in one go.

The useradd command can create a new user on your Linux system. Here is how to add a password as well all in one simple operation. root@neo:/home/jason# useradd -m -s /bin/bash -g users -p $(openssl passwd -1 ff302) randycoleroot@neo:/home/jason# useradd -m -s /bin/bash -g users -p $(openssl passwd -1 ff302) randycole This is a good … Read more

How to create a shared folder for a group of users on Debian Linux.

How to create a shared folder on a Linux machine that a group of users may access. This is very useful for a shared folder that many users may place files. Firstly; you need to create a folder in the /opt directory. root@neo:/opt# mkdir sharedfilesroot@neo:/opt# mkdir sharedfiles Then you need to set the proper permissions … Read more

Creating a new user on a Linux workstation with the shell.

Creating a new user with the Linux command-line is very easy, the command-line adduser command is easier to use than the useradd command and automates a lot of the steps involved in creating a new user and their home directory. The sequence shown below is the simple task of creating a new user and shows … Read more