MacOS – Admin in Terminal, logged on Family’s session

hostsmacosvpn

I have a weird problem. I'm trying to connect on my VPN with Mac 10.7.5 (Java 7 U45, Citrix Receiver 11.8) but when I do, JSam is not able to write in Hosts file.

So my Mac session is called "Family" but when I go in Terminal and type whoami, I get: Admin.

My question is, is it normal and if not, how can I see "Family" in Terminal? Or, how can I give proper rights to Family or Admin so when I connect on my office VPN, Citrix will be able to write in hosts file.

Best Answer

Host mapping - "JSAM modifies the hosts file if you choose Automatic host-mapping under Users > User Roles > Role > SAM > Options > Java SAM Options" (from here). Which is apparently running on the server side. If you are managing the server, try disabling host mapping unless you need it. At the very least, disable it temporarily and see if everything else works as expected. (If you can do everything you need without host mapping, then leave it turned off.)

Looks like if hosts file modification is enabled, the client needs to run as admin or root (see here) and should be prompting you for the admin password for your account on launch. If your local account does not have administrative permissions, then it would not be able to modify the hosts file. You'd need to log in as an administrator, not a user.

You haven't made it clear whether Terminal output is from your local machine or the remote one.