LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   Giving a user root permission via the root group (https://www.linuxquestions.org/questions/linux-security-4/giving-a-user-root-permission-via-the-root-group-571450/)

louisb 07-22-2007 06:01 PM

Giving a user root permission via the root group
 
I've just install Red Hat Linux 5 and now I want to give myself root permissions with them having to sign-on as root. I've placed my userid in the root group. However, when ever I try to perform a command that requires root permission I'm told that only root can perform this command.

I have a second question regarding mount of a network share? I want to mount network drives at the time of user sign-on. I've placed the mount command in the ".bash_profile" and I still get the message that only root can perform a mount.

How do resovle the two problems above?



Thanks

slakmagik 07-22-2007 06:12 PM

You should really search the web for information on why Unix permissions are as they are and how what you're trying to do essentially undercuts them in a very bad way. As far as the 'root' group, you're still not UID root, so are getting these messages. A more proper way to do it would be to selectively give yourself permissions like 'disk' or what have you.

Incidentally, why such an old release? You should upgrade for both security and comfort.

jschiwal 07-22-2007 07:04 PM

Even making yourself a member of the disk group isn't a good idea. I will give you full access to devices such as /dev/hda. There is a wheel group that you can make yourself a member of and then use "visudo" to allow wheel group members to use sudo.

louisb 07-22-2007 08:18 PM

My approach here is to apply group level security in the same way things are on the Mainframe and in a Windows environment. However, I understand your point perfectly.

My other question is about mounting network shares when a user signs-on. As I said eariler I've placed the mount in the ".bash_profile" and when I sign-on the get the permission denied for the mount. Surely I can assign network drive by users to be mounted.


Thanks

slakmagik 07-22-2007 08:32 PM

May need to put it in /etc/fstab and give it the 'user' option.

louisb 07-22-2007 09:06 PM

I admit that I'm new to the Linux environment. By putting the mount in "fstab" however, then do I make the mount available to other users who sign-on using there own userid's and passwords?


Thanks

jschiwal 07-23-2007 12:56 AM

There is also a pam_mount module you might want to look at.

With an /etc/fstab entry;
If the permissions of the filesystem are exclusive for that user, then even if another use can mount it, they can't use it at all. If all of the users are on the same network device, you could have the /home directory mounted on the network device at boot time, containing user directories.

Also, look at "man autofs" and "man 5 auto.master" documentation.


All times are GMT -5. The time now is 01:55 AM.