Get a mystery "googleapis" computer name when I use sudo -i

Discussion in 'macOS' started by macrumorsjeff, Mar 1, 2017.

  1. macrumorsjeff macrumors newbie

    Joined:
    Mar 1, 2017
    #1
    Hi,
    This is my first thread here. I use terminal to execute some program and I get a mystery "googleapis" as my computer name. Normally, it show up my computer name with root, the format such as this XXXdeMacBook:~ root#. The first XXXdeMacBook is my computer name and the root is the system ultimate user. The most weird thing is the "XXXdeMacBook" replaced by "googleapis". This is quite strange. Does anyone know this? Thanks.
     
  2. casperes1996 macrumors 65816

    casperes1996

    Joined:
    Jan 26, 2014
    Location:
    Horsens, Denmark
    #2
    What program are you trying to run, and which path do you initiate sudo from? Have you made any changes to your login database?
     
  3. macrumorsjeff thread starter macrumors newbie

    Joined:
    Mar 1, 2017
    #3
    Hi,
    Thanks your reply. I didn't run any program at this case. However, sometimes I run sudo with dd to burn the img. My path is my account path, "cd ~". Where can I check the login database? My OS is 10.12.3. I thinks I didn't change any login configuration or data. But, I am not sure the other program while I have installed on my computer. Would you know some methods to handle this? The "root" on "googleapis" is quite weird and intriguing. Is this any potential matter on my system?
     
  4. casperes1996 macrumors 65816

    casperes1996

    Joined:
    Jan 26, 2014
    Location:
    Horsens, Denmark
    #4
    The Sudo database is in /etc/
    It's called Sudoers.
    However, on 10.12 SIP (System Integrity Protection) locks the Sudoers file, even for users of sudo/su. Since you haven't manually disabled SIP to change the file, I doubt that's where the 'problem' comes from.

    It is weird and intriguing indeed, and I'm really thinking to figure this one out, with not much luck. I mean, the googleapis, is a way for programmers to interact with Google services in their apps, but why it became related to your root account? I have no clue.

    Have you ever had SIP turned off for any reason? Can't think of anything right now, aside from replacing the Sudoers file with the Sudoers.orig file tha Mac keeps as sort of a backup. It wouldn't make any sense if you've never had SIP turned off though.
     
  5. KALLT macrumors 601

    Joined:
    Sep 23, 2008
    #5
    It is not the computer name, but the host name. They may not always be the same and choosing the host name is not ultimately within your control. Your router can change it.

    Make sure that your preference is set in System Preferences -> Sharing (click on 'Edit…').

    Avoid using root directly. Much safer by using sudo.

    Most files in /etc are not protected by SIP, specifically not sudoers.
     
  6. casperes1996 macrumors 65816

    casperes1996

    Joined:
    Jan 26, 2014
    Location:
    Horsens, Denmark
    #6
    Are you sure about that? Because I tried opening it, and even with sudo, it says I don't have permission, which is usually a sign that it's SIP locked.

    But thanks for the very informative reply. You seem quite knowledgable of Bash
     
  7. KALLT macrumors 601

    Joined:
    Sep 23, 2008
    #7
    Yep. /etc and /var are specifically there for administrators. The ~orig files are created by the system installer, to leave the previous configuration files intact.
     
  8. casperes1996 macrumors 65816

    casperes1996

    Joined:
    Jan 26, 2014
    Location:
    Horsens, Denmark
    #8
    Yeah - knew about the orig files. Just a bit confused why I then couldn't access the file even with sudo.
     

Share This Page