Ubuntu +新しいユーザーアカウントにroot権限を追加する

Ubuntu +新しいユーザーアカウントにroot権限を追加する

私はUbuntuバージョンを持っています - 12.04

これは sudoers ファイルです

# User privilege specification
root    ALL=(ALL:ALL) ALL

# 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

# See sudoers(5) for more information on "#include" directives:

#includedir /etc/sudoers.d

新しいユーザーを作成しました - test_app

%adminユーザーと同じroot権限を付与したいと思います。

VIA visudoを追加するには、どの行が必要かを教えてください。

ベストアンサー1

最初adminはユーザーではなくグループで、%役割に基づいて識別できます。

これで、問題に対してsudo次の行をファイルに追加して、ユーザーにフルアクセス権を追加できるようになりました。test_app

test_app    ALL=(ALL:ALL) ALL

sudoその後、ユーザーのコンテンツを使用できます。test-app

sudoただし、sudoersファイルを変更する必要がないように、ユーザーをグループに追加することをお勧めします。

usermod -a -G sudo test_app

おすすめ記事