Saturday, April 27, 2024
40
rated 0 times [  40] [ 0]  / answers: 1 / hits: 69627  / 2 Years ago, wed, december 29, 2021, 5:43:29

Running Ubuntu 12.04, I setup a private git server and created a group called git some time ago. Now I am following a guide to install gitlab and when it came to adding a user to the git group and create it, I saw that I already had it.



The command is this:



sudo adduser --disabled-login --gecos 'GitLab' git


taken from Gitlab installation Tutorial.



I would like to understand that command correctly. For me I thought I add a user to a group like this:



adduser user group


So what do --disabled-login and --gecos stand for?


More From » command-line

 Answers
6

It's all written in the manual page!



enter image description here



You don't need to install something, to search on google or to have an internet connection. Just open your terminal and first of all you must to run the following command:



man adduser


to open the manual page for adduser command.



Then, in that manual page type: /--disabled-login followed by Enter then press repetitively n to find all occurrences containing --disabled-login. Do the same for --gecos.



With a little bit of luck you will find out that:




--disabled-login
Do not run passwd to set the password. The user won't be able
to use her account until the password is set.



and:




--gecos GECOS
Set the gecos field for the new entry generated. adduser will
not ask for finger information if this option is given.



For those wondering what gecos actually is, wikipedia defines it as follows:




The gecos field, or GECOS field is an entry in the /etc/passwd file on Unix, and similar operating systems. It is typically used to record general information about the account or its user(s) such as their real name and phone number.



[#27014] Friday, December 31, 2021, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
jokaned

Total Points: 315
Total Questions: 116
Total Answers: 119

Location: Somalia
Member since Mon, Feb 27, 2023
1 Year ago
;