關於sudoers中的admin group和sudo group

來源:互聯網
上載者:User
What
is the difference between the 'sudo' and 'admin' group?

I noticed that two groups are granted similar-looking permissions in /etc/sudoers:

# Members of the admin group may gain root privileges%admin ALL=(ALL) ALL# Allow members of group sudo to execute any command%sudo   ALL=(ALL:ALL) ALL

My user account with "Administer the system" privileges is in the admin group,
and there don't appear to be any users in the sudo group.
What are these two groups for?

Ubuntu 12.04 LTS and later

Administrators are added to the sudo group,
but the admin group
is supported for backward compatibility. From the release
notes:

Up until Ubuntu 11.10, administrator access using the sudo tool was granted via the admin Unix
group. In Ubuntu 12.04, administrator access will be granted via the sudo group.
This makes Ubuntu more consistent with the upstream implementation and Debian. For compatibility purposes, the admingroup
will continue to provide sudo/administrator access in 12.04.

It is not created when you do a fresh install, though it is still present if you upgraded from previous distributions. Either way, the admin group
appears in the /etc/sudoers file.

See implementation
details and the official
documentation.

Ubuntu 11.10 and earlier

By default the sudo group
is not used in Ubuntu:

  • the user created during installation belongs to admin group,
    not sudo;
  • no guide or manual I ever read advices to use the sudo group;
  • no one feels the need to use the sudo group,
    because the admin group
    can do all one needs.

Conversely, on Debian the group enabled in /etc/sudoers is
the sudo group,
and there is no admingroup.
But the user created during installation is not put in that group, because Debian has the rootaccount
enabled. You should do it explicitly, if you want to.

Also, Fedora is similar to Debian,
having root enabled
and no default privileges for the user create during installation. But the administrative group configured in /etc/sudoers is
the more traditional groupwheel.

In conclusion, I think there is no use for sudo group
in Ubuntu, simply it is a Debian heritage.

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.