As from title, I get some confusion regarding my user’s administration settings. The problem emerged when I tried to delete a folder in the home directory (it was an application I wanted to get rid of) but I could not due to access denied.
Trying to figure out how to solve,I ran through “Menu Editor” a default application that can set some parameters about how applications launch. In particular it allows to set whether a specific app needs to be opened through a different user, hence I set this to “root” for Dolphin (the File Explorer), saved and close.
When trying to open Dolphin at this point, it asks me the password (through the prompt with which the psw is usually working for the system) but does not accept the correct one and further prompts me the following.
I’m kind of stuck because I don’t know how to add my user to other groups and do not even know to which group I should add it (it suggests ‘wheel’ but why not ‘root’?)
Can anyone help me in figuring this out?
Thanks a lot!
EDIT:
The point is that I basically want my user to have highest privileges through the entire use of the system, just making it prompts to ask the psw for most delicate processes
Thats already a possible problem … your HOME should all be owned by your user.
This would not be the method … but also … you should not open graphical applications as root or with sudo. There used to exist programs specifically for it like gtksudo … but they have long been retired because it was realized to be a bad idea that could not be implemented properly.
Hopefully you can undo this change. Tell us if not.
Then we can help with any further deletions or permissions.
Hi,
Sure
So … is the issue now that you still have a folder/file to remove that you cannot?
Maybe we can have you list the files and permissions…
(provide path as necessary, such as if a folder in home “Games”)
Anyhoo … if you want to remove it you can use the handy sudo
(some explanation … despite often being considered ‘super user do’ … sudo is in fact simply ‘do as other user’ but defaults that user to ‘root’ when no argument is passed … hence sudo someaction becomes ‘do someaction as root’ … and rm is remove of course … you need the -r for recursion - a requirement for folders)
sudo rm -r ~/synergy-core
Depending on how that directory ended up there in the first place … you may want to check your HOME to make sure the permissions are correct.
On to the rest of your thread…
I would try to dissuade you from trying to do what you think you want to do.
Linux, as a permissions based system … is intended to be used this way. Generally actions that require these privileges do so for a reason.
There are some good introductions out there … which I am terrible at finding for the moment.
Ah … besides these two … which may or may not be useful to you.
Ok it worked without problems.
It arrived there because I installed this software through git clone and it was placed by default in home directory, if I remember correctly.
I’m actually interested in what you were saying here:
I want to understand what is the hierarchy in the privileges possessions in the system, and especially want to know why my password could not work in some situations.
EDIT
Ok, gonna read those.
Do they also help me with this?
Beyond root being the dominant one-above-all there isnt a true hierarchy … users or groups can have permissions for only certain commands or files … only read access (cannot write anything), and so on.
Did you possibly use sudo git clone or had previously used su before the clone ?
A simple git clone someurl.com/thing.git should by default be done as regular user and the resulting directory owned by the same user. It also defaults to downloading wherever the command was invoked … by default your terminal opens at your HOME.
Which brings us to the next:
Maybe just a quick run of ls -la in your HOME … just see that it prints your user for all the listings.
The guides are just what I could grab on hand … one from a team member intended for new linux users … and one of my personal favorite ‘get comfortable with basics in the terminal’ interactive tutorials.
By default that should be everything in your HOME, Trash, and TMPFS (/tmp)
Pretty much everything else will be owned by root.
Modern utilities use polkit to dynamically ask for elevated permissions … for example Kate - you do not need to sudo kate even on a root owned file … just open it … and if you make changes and save … it will ask for the password.
It is also worth mentioning here that the root password and your (or any) given user password are not necessarily the same. Many single-user admins set it up this way … but it would have been a choice at install.
First of all, because you’ve done it this way, the password it’s asking for is the root account’s password, not your own password as you use with sudo.
Secondly, in order to use any component of Plasma with elevated privileges, you should prefix the command with pkexec.
But read on…
UNIX was designed to allow users to do everything that’s needed and nothing that can jeopardize the stability and security of the system. You should always use the principle of least privileges.
Indeed, because it’s a recipe for disaster.
Without elevated permissions, you have write access to your ${HOME}, to /tmp and to /var/tmp, and if your system runs its own mail server, to /var/spool/mail/${USER}. Everything else is read-only for unprivileged users.
The root account on the other hand has write access to everything, which is exactly why you should not elevate your privileges in vain.