ubuntu启用root
For UNIX users/developers, having the power of the user 0 (root’s UID) on our hands is essential. It also allows us to have complete control over the system. And one more thing we all have in common is that we hate Windows. Thus, we set out in search of an operating system for our own personal use…
对于UNIX用户/开发人员来说,掌握用户0(root用户的UID)的权限至关重要。 它还使我们可以完全控制系统。 我们还有一个共同点是讨厌Windows。 因此,我们开始寻找供自己使用的操作系统。
Normally we’ll end up with one of these: Fedora, Ubuntu, RHEL,..
通常,我们最终会使用以下之一:Fedora,Ubuntu,RHEL等。
But one of them stands out prominently – Ubuntu! It is the most publicized linux operating system out there and they claim that it is usable by even laymen without any trouble. To actually support such a wide spectrum of audience, folks who develop Ubuntu have disabled the root user on the system so that everyday users don’t mess with the critical system settings by accident. But a direct consequence of this to us, power users is that we’ve always got to authenticate ourselves one more time, keep using ‘sudo’ on every command, remember to use sudo on when editing files which belong to the system.
但是其中之一非常引人注目-Ubuntu! 它是目前最受关注的linux操作系统,他们声称即使是外行也可以使用它,而不会遇到任何麻烦。 要真正支持的观众如此广泛,人们谁使普通用户偶然不与关键系统设置乱开发的Ubuntu禁用了root用户的系统上。 但是,这对我们(超级用户)的直接后果是,我们总是必须再进行一次身份验证,在每个命令上继续使用“ sudo”,在编辑属于系统的文件时请记住在使用sudo。
By doing the following steps we can be rid of that restriction that’s placed on our shoulders:
通过执行以下步骤,我们可以摆脱肩膀上的限制:
sudo -i
sudo -i
And set the password for root using
并使用设置root密码
sudo passwd root
sudo passwd root
Now you’re good to go!
现在您可以出发了!
And for some reason you want to disable being root again
由于某种原因,您想再次禁用root
sudo passwd -dl root
sudo passwd -dl root
You can experiment more with the sudo stuff to have a middle ground solution by looking at the command’s man page, but beware you could mess up the system. Oh! one last thing – One thing we, UNIX developers and users hate is to re-install the system because it’s not coming up.
通过查看命令的手册页,您可以对sudo进行更多的试验以找到一个中间解决方案,但是请注意,您可能会弄乱系统。 哦! 最后一件事–我们,UNIX开发人员和用户讨厌的一件事是重新安装系统,因为它没有启动。
ubuntu启用root