As you know, the /etc/passwd file has 7 fields on each line. The lines from /etc/passwd having more than 7 fields can create security vulnerabilities or generate massive system errors. It is better to remove them This little awk oneliner…
As you know, the /etc/passwd file has 7 fields on each line. The lines from /etc/passwd having more than 7 fields can create security vulnerabilities or generate massive system errors. It is better to remove them This little awk oneliner…
In this article I will show you 2 ways for changing a user’s login shell, with the usermod and chsh tools. Before you set a new shell, check if you have the needed shell listed in the /etc/shells file. If…
In Linux and Unix, the processes and services run under different users. The processes may have a user created specifically for them, and, if they do not, they will run under a user called nobody. E.g. sshd is the user…
The /etc/password file is very important on Unix systems because it stores information about all the user accounts in the system. It is readonly, the users can read the file, but not to modify it, unless they have superuser priviledges.…
Do not edit the /etc/passwd, /etc/shadow, /etc/group and /etc/gshadow by hand !!! If a user tries to change it’s account / group info while root is editing the files by hand (ex: vim /etc/passwd), the /etc files will not pe…
The useradd command is generical for all the Linux distros: Syntax: useradd [options] username Creating users with the default configuration: $ sudo useradd yoda $ grep yoda /etc/passwd yoda:x:1010:1012::/home/yoda:/bin/sh To view the default options for creating users, use useradd -D…
In this tutorial, I will teach you how to copy files and folders from one place to another, by using the cp command. Syntax1: cp [options] file filecopy Syntax2: cp [options] -T filecopy fileĀ I always use the first syntax…