Linux:Centos/用户:修订间差异

来自康健生活
Kangkk​(留言 | 贡献)
Kangkk​(留言 | 贡献)
无编辑摘要
第7行: 第7行:
add user.
add user.
{{shc|<syntaxhighlight lang="bash">
{{shc|<syntaxhighlight lang="bash">
adduser kangkk</syntaxhighlight>}}
adduser kangkk</syntaxhighlight>|$|/home/kangkk}}


change user password.
change user password.
{{shc|<syntaxhighlight lang="bash">
{{shc|<syntaxhighlight lang="bash">
passwd kangkk</syntaxhighlight>}}
passwd kangkk</syntaxhighlight>|$|/home/kangkk}}


add new user's root role
add new user's root role
{{shc|<syntaxhighlight lang="bash">
{{shc|<syntaxhighlight lang="bash">
whereis sudoers</syntaxhighlight>}}
whereis sudoers</syntaxhighlight>|$|/home/kangkk}}


{{shc|<syntaxhighlight lang="bash">
{{shc|<syntaxhighlight lang="bash">
chmod -v u+w /etc/sudoers
chmod -v u+w /etc/sudoers
vi /etc/sudoers</syntaxhighlight>}}
vi /etc/sudoers</syntaxhighlight>|$|/home/kangkk}}


{{hc|sudoers|<syntaxhighlight lang="javascript">...
{{hc|sudoers|<syntaxhighlight lang="javascript">...
root ALL=(ALL) ALL
root ALL=(ALL) ALL
admin ALL=(ALL) ALL
admin ALL=(ALL) ALL
...</syntaxhighlight>}}
...</syntaxhighlight>|$|/home/kangkk}}


{{shc|<syntaxhighlight lang="bash">
{{shc|<syntaxhighlight lang="bash">
chmod -v u-w /etc/sudoers</syntaxhighlight>}}
chmod -v u-w /etc/sudoers</syntaxhighlight>|$|/home/kangkk}}