Linuxでデフォルトのグループ属性なしでユーザーを作成する方法は?

Linuxでデフォルトのグループ属性なしでユーザーを作成する方法は?

わかりました、プロパティを使用して作成する方法

adduser -n username

グループ、私たちはで検索します/etc/default/useradd。しかし、あなたはlogin.defs何かを追加することができます。

ベストアンサー1

必要なものをデフォルトでadduser user1作成してuser1グループに含めるには、次の行を変更する必要があります。101/etc/adduser.conf:

# The USERGROUPS variable can be either "yes" or "no".  If "yes" each
# created user will be given their own group to use as a default.  If
# "no", each created user will be placed in the group whose gid is
# USERS_GID (see below).
USERGROUPS=yes

# If USERGROUPS is "no", then USERS_GID should be the GID of the group
# `users' (or the equivalent group) on your system.
USERS_GID=100

したがって、お客様の場合は、次のことを行います。

USERGROUPS=no
USERS_GID=101

おすすめ記事