Was macht "sudo -H"?

Hallo alle,

Frage siehe Topic. Ich hatte dazu mal ne Info gefunden, kann sie aber nicht wieder finden. :frowning:
Bei radeon-profile wird genau dieser Switch vorgeschlagen.

man sudo

     -H, --set-home
                 Request that the security policy set the HOME environment variable to the home directory specified by the target user's
                 password database entry.  Depending on the policy, this may be the default behavior.
1 Like

Wen ich das richtig verstehe, wird durch den Befehl das /home Verzeichnis gewechselt. Es wird dann nicht das /home Verzeichnis des Users benutzt, sondern das des Root Accounts, in der Regel also /root. Dadurch soll verhindert werden, dass Dateien in deinem /home im “Besitz” von Root sind.

“So the -H flag makes sudo assume root 's home directory as HOME instead of the current user’s home directory. Otherwise some files in the user’s home directory would become owned by the root, which may lead to various problems.”

Someone please correct me if that’s wrong information!

1 Like

Danke. Werde das ab sofort öfter nutzen.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.