You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`password` - This field is actually a placeholder of the password field. Due to security concerns, this field does not contain the password, just a placeholder (x) to the encrypted password stored in `/etc/shadow` file.
1970
+
1971
+
`UID` - User ID of the user.
1972
+
1973
+
`GID` - Group ID
1974
+
1975
+
`Comment` - This field is to provide description about the user.
1976
+
1977
+
`home directory` - Abousulte path of the user's home directory. This directory gets created once the user is added.
1978
+
1979
+
`shell` - This field contains the absolute path of the shell that will be used by the respective user.
1980
+
</details>
1929
1981
1930
1982
<details>
1931
1983
<summary>How to add a new user to the system without providing him the ability to log-in into the system?</summary><br><b>
@@ -1942,8 +1994,17 @@ Use su - to switch to root
1942
1994
</b></details>
1943
1995
1944
1996
<details>
1945
-
<summary>What is the UID the root user? What about a regular user?</summary><br><b>
1946
-
</b></details>
1997
+
<summary>What is the UID the root user? What about a regular user?</summary><br>
1998
+
1999
+
UID of root user is 0
2000
+
2001
+
Default values of UID_MIN and UID_MAX in `/etc/login.defs`
2002
+
`UID_MIN` is `1000`
2003
+
`UID_MAX` is `60000`
2004
+
2005
+
Actually, we can change this value. But UID < 1000 are reserved for system accounts.
2006
+
Therefore, as per the default configuration, for regular user UID starts from `1000`.
2007
+
</details>
1947
2008
1948
2009
<details>
1949
2010
<summary>What can you do if you lost/forogt the root password?</summary><br><b>
@@ -1952,8 +2013,10 @@ Re-install the OS IS NOT the right answer :)
1952
2013
</b></details>
1953
2014
1954
2015
<details>
1955
-
<summary>What is /etc/skel?</summary><br><b>
1956
-
</b></details>
2016
+
<summary>What is /etc/skel?</summary><br>
2017
+
2018
+
`/etc/skel` is a directory, that contains files or directories, so when a new user is created, these files/directories created under `/etc/skel` will be copied to user's home directory.
2019
+
</details>
1957
2020
1958
2021
<details>
1959
2022
<summary>How to see a list of who logged-in to the system?</summary><br><b>
@@ -1968,6 +2031,11 @@ Using the `last` command.
1968
2031
* usermod
1969
2032
* whoami
1970
2033
* id</summary><br><b>
2034
+
2035
+
`useradd` - Command for creating new users
2036
+
`usermod` - Modify the users setting
2037
+
`whoami` - Outputs, the username that we are currently logged in
0 commit comments