Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

macrumorsjeff

macrumors newbie
Original poster
Mar 1, 2017
2
0
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.
 

macrumorsjeff

macrumors newbie
Original poster
Mar 1, 2017
2
0
What program are you trying to run, and which path do you initiate sudo from? Have you made any changes to your login database?
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?
 

casperes1996

macrumors 604
Jan 26, 2014
7,599
5,771
Horsens, Denmark
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?

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.
 

KALLT

macrumors 603
Sep 23, 2008
5,380
3,415
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.

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.

Most files in /etc are not protected by SIP, specifically not sudoers.
 

casperes1996

macrumors 604
Jan 26, 2014
7,599
5,771
Horsens, Denmark
Most files in /etc are not protected by SIP, specifically not sudoers.

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
 

KALLT

macrumors 603
Sep 23, 2008
5,380
3,415
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.

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.
 

casperes1996

macrumors 604
Jan 26, 2014
7,599
5,771
Horsens, Denmark
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.

Yeah - knew about the orig files. Just a bit confused why I then couldn't access the file even with sudo.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.