如何自动协调 /etc/group 和 /etc/gshadow

如何自动协调 /etc/group 和 /etc/gshadow

运行grpck检查组时,我发现以下错误:

 'twinky' is a member of the 'foo' group in /etc/group but not in /etc/gshadow
 'dipsy' is a member of the 'foo' group in /etc/group but not in /etc/gshadow
 'laalaa' is a member of the 'foo' group in /etc/group but not in /etc/gshadow
 'po' is a member of the 'foo' group in /etc/group but not in /etc/gshadow
 'noonoo' is a member of the 'foo' group in /etc/group but not in /etc/gshadow
 'dipsy' is a member of the 'foo' group in /etc/group but not in /etc/gshadow
 ...

... 等等。我不知道这是怎么发生的,我想把它清理干净。我知道我可以手动编辑/etc/gshadow,但我宁愿让操作系统来做,以防止拼写错误和手动操作。

有什么可以自动将群组协调到 gshadow 中吗?也许是类似的东西(编造的):

# grpfix foo

我尝试使用 man 来搜索各种与组相关的命令,也在 Google 上搜索过,但到目前为止我还没有找到答案。

答案1

男人得到了我之前错过的答案:

grpconv

http://linux.die.net/man/8/grpconv

grpconv 命令从组和可选的现有 gshadow 创建 gshadow。

相关内容