Skip to content

Why does su not set USER and LOGNAME when target is root? #1646

Answered by karelzak
septatrix asked this question in Q&A
Discussion options

You must be logged in to vote

It's original code from the coreutils project, and I don't remember the original purpose, but I guess it's a way how to provide info about the original user to the session, it just changes permissions and nothing else. The default is to do minimal changes to the environment. If you don't like it you need to use -l to create a more isolated session.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by septatrix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants