`sudo logname` returning `root` instead of my user
See original GitHub issue- I am on the latest Hyper.app version
- I have searched the issues of this repo and believe that this is not a duplicate
- OS version and name: macOS Catalina
- Hyper.app version: 3.0.2
- Link of a Gist with the contents of your .hyper.js: default one, not relevant
- Relevant information from devtools N/A
- The issue is reproducible in vanilla Hyper.app: Is Vanilla
Issue
If I run sudo logname
on Hyper, I get root
, but if I run it on any other terminal app (included the macOS default one), I get my username (which is what I’d expect).
Above, Hyper, below, Terminal:
Issue Analytics
- State:
- Created 4 years ago
- Comments:6
Top Results From Across the Web
username is appearing as root instead of a user who logged in?
Ah, this is simple. Your jenkins user is defined in /etc/passwd like this: jenkins:x:996:993:Jenkins Automation ...
Read more >Why does "sudo -u root echo `whoami`" not return root?
sudo echo `whoami`. Returns your name because whoami changes to your username before sudo runs. It's like: sudo echo myname. you can see...
Read more >How Can I Log In As root User? - nixCraft
Explains how to log in as a root user ( super user) under UNIX / Linux / BSD / macOS operating systems from...
Read more >How to come out of root user? - Ask Ubuntu
From what I gather you're simply trying to return to your user account after gaining access to root. Try typing exit. in terminal....
Read more >How do you find the original user through multiple sudo and ...
Results: Use who am i | awk '{print $1}' OR logname as no other methods are guaranteed. Logged in as self: evan> echo...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I don’t have a mac, so that’s a nope from me, sorry.
I’ve filed an issue over at Electron, and the reply there was as follows:
Oh, Apple … 😭