LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Maximizing user permissions (https://www.linuxquestions.org/questions/linux-newbie-8/maximizing-user-permissions-651952/)

Honeysuckle 06-26-2008 10:40 PM

Maximizing user permissions
 
I am learning/experimenting with debian. My computer is a standalone home desktop which is only used for internet. Accordingly, I'd like as many user permissions as I can give myself to avoid having to logout and login as root every time I want to do something. I've given myself "permission" to view logs by adding myself to an "admn" (or something like that) group. Are there other ways to maximise my user permissions?

Also, I can use the root terminal, but my knowledge of how to do things using the command line is limited. The only way I know how to do things that need root is to log in as root, but is there a way to elevate yourself to root and use the gui tools without logging out as user and logging in as root?

Thanks

Mr. C. 06-26-2008 11:33 PM

root is a single number - 0. It is implemented in the *nix kernel. If a process' user ID is 0, it is not restricted from performing operations as are non-0 UID processes. Its that simple.

You do not need to exit a given environment to temporarily elevate privileges. What you are essentially doing by changing your permissions everywhere is defeating the entire purpose of those permissions and security. In such as case, you might as well become root and stay that way.

What types of operations are you performing, that you feel you need to login/logoff ?

phantom_cyph 06-26-2008 11:46 PM

You shouldn't be running as root anyway. Don't log in and out. Debian uses sudo, to run a program such as Synaptic Package Manger or similar, just do a:
Code:

sudo synaptic
After which you will need to give your password, not the root password. If it says you are not in the sudoers file, do the following:

Code:

you@hostname$ su #enter root password

root@hostname$ visudo
#type "I"
#scroll to bottom, add the following line to the end:

yourusername                ALL = (ALL) ALL

#press "Escape"
#type ":w"
#press Enter
#type ":q!"
#press Enter

then log out, and in again.

If sudo complains again, restart your computer (shouldn't have to). Its better to use that than running as root.

Honeysuckle 06-27-2008 12:46 AM

Quote:

Originally Posted by Mr. C. (Post 3196470)
What types of operations are you performing, that you feel you need to login/logoff ?

Amending my xorg.conf file so that my mouse buttons will work, amending the chrome thing so that the browser fonts are a reasonable size, doing anything with my Iceweasel profile, copying files that have restricted permissions....

Quote:

What you are essentially doing by changing your permissions everywhere is defeating the entire purpose of those permissions and security. I
The only permission I have changed is to let me see MY computers logs. I don't think it is secure to keep me completely in the dark as to what is going on on my computer......

Mr. C. 06-27-2008 12:54 AM

As others have suggested, use sudo or su. You can run any program you want with elevated privs; no log on/off required.

There are years of wisdom behind the decisions made on file permissions. Don't change your log permissions - instead learn about groups. Add your user id to the group that owns logs.

See /etc/group.


All times are GMT -5. The time now is 08:10 PM.