![如何自动协调 /etc/group 和 /etc/gshadow](https://linux22.com/image/584588/%E5%A6%82%E4%BD%95%E8%87%AA%E5%8A%A8%E5%8D%8F%E8%B0%83%20%2Fetc%2Fgroup%20%E5%92%8C%20%2Fetc%2Fgshadow.png)
运行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 上搜索过,但到目前为止我还没有找到答案。