如何在linux redhat 5中授予用户完全权限

发布于 2024-10-22 02:37:02 字数 1459 浏览 5 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

遥远的她 2024-10-29 02:37:02

正如 ThiefMater 所说,正确的方法是给他 sudo 访问权限,但如果你想为某个用户设置完全权限,编辑 /etc/passwd

你应该有类似的内容,

 daniel:x:1000:100:WhateverUserNameYouUse,someMoreInfo:/home/daniel:/bin/bash

将 1000 和 100 更改为 0

 daniel:x:0:0:WhateverUserNameYouUse,someMoreInfo:/home/daniel:/bin/bash

但是,听着,整个普通用户帐户的想法是不能完全访问所有内容。如果这就是您想要的,您也可以直接以 root 身份登录。不过,有几个原因不这样做,其中之一是普通用户软件通常不如 root 访问通常要求的安全,这意味着如果有人通过互联网侵入用户实用程序,例如 gaim,当您以 root 身份登录,他们可能会破坏您的整个系统。
你为什么要这样做?发表评论,也许我可以帮助你,而无需这样做。

As ThiefMater stated, the proper way is giving him sudo access, but if you wish to set full permissions for a certain user, edit /etc/passwd

You should have something like

 daniel:x:1000:100:WhateverUserNameYouUse,someMoreInfo:/home/daniel:/bin/bash

Change that 1000 and 100 for 0

 daniel:x:0:0:WhateverUserNameYouUse,someMoreInfo:/home/daniel:/bin/bash

But still, listen, the entire idea with a normal user account is to not have complete access to everything. If that's what you want, you can just as well log in as root directly. There are several reasons not to do that, though, among others that normal user software usually isn't as secure as what is normally required by root access, meaning that if someone hacks into a user utility, like gaim, over the internet when you're logged in as root, they can trash your entire system.
Why do you want to do this? Comment and maybe I'll can help you w/o doing this.

风铃鹿 2024-10-29 02:37:02

如果某人应该拥有完全权限,正确的方法是授予他对 root 用户的 sudo 访问权限。然后他可以使用 sudo su - 来获取 root shell。

另一种解决方案是为用户提供 UID 0,这使他成为 root 用户。然而,通常最好只有一个 UID 0 用户:root。

If someone should have full permissions the proper way is giving him sudo access to the root user. Then he can use sudo su - to get a root shell.

Another solution would be giving the user the UID 0 which makes him a root user. However, usually it's good to have only one UID 0 user: root.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文