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

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/5323775/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-05 03:16:36  来源:igfitidea点击:

how to give the user a full permissions in linux redhat 5

linuxredhat

提问by user662253

I have created the user "tungsten" now how do I give full permissions to the user in linux redhat 5

我已经创建了用户“tungsten”,现在如何在 linux redhat 5 中向用户授予完全权限

回答by ThiefMaster

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

如果某人应该拥有完全权限,正确的方法是让他sudo访问root用户。然后他就可以用sudo su -得到一个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.

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

回答by dLobatog

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

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

You should have something like

你应该有类似的东西

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

Change that 1000 and 100 for 0

将 1000 和 100 更改为 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.

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