Google Compute Engine:修订间差异

来自Gea-Suan Lin's Wiki
跳到导航 跳到搜索
此页面具有访问限制。如果您看见此消息,则说明您没有权限访问此页面。
第12行: 第12行:


<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
echo "%staff ALL = (ALL:ALL) NOPASSWD: ALL" | tee /etc/sudoers.d/group-staff
echo "%staff ALL = (ALL:ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/group-staff
</syntaxhighlight>
</syntaxhighlight>



2023年3月7日 (二) 10:33的版本

Google Compute Engine

范例

关闭GCE的自动建立账号以及SSH key机制:

echo -e '[Daemons]\naccounts_daemon = false' | sudo tee /etc/default/instance_configs.cfg; sudo reboot

所有在staff群组的人都可以无限制sudo:

echo "%staff ALL = (ALL:ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/group-staff

外部链接