默认将用户添加到组

默认将用户添加到组

我有一个系统上所有用户共享的组。组名称是通用的,它允许计算机上的每个人进行通用文件共享。我如何才能让所有新用户默认添加到该组中? [adduser 命令不需要手动干预]

答案1

设置ADD_EXTRA_GROUPSEXTRA_GROUPS/etc/adduser.conf.从联机帮助页:

   ADD_EXTRA_GROUPS
          Setting this to something other than 0 (the default) will  cause
          adduser  to  add  newly  created non-system users to the list of
          groups defined by EXTRA_GROUPS (below).

   EXTRA_GROUPS
          This is the list of groups that new  non-system  users  will  be
          added  to.  By default, this list is 'dialout cdrom floppy audio
          video plugdev users games'

相关内容