[lug] Mac unix root account and /etc/hosts

Jason Vallery jason at vallery.net
Thu Jun 5 14:06:46 MDT 2008


Starting with Leopard (10.5) things are a bit different in the OS X world.
Prior to Leopard there was an application called NetInfo that was used to
edit network settings and specify host names.  After changing /etc/hosts you
had to manually import them into the DNS cache. Now in Leopard this is done
automatically for you as the system monitors the file for changes.

You can also use a utility called dscl to edit the hosts and manually
specify overrides.  do 'man dscl' for full information about the utility.

-Jason



On Thu, Jun 5, 2008 at 1:47 PM, <dio2002 at indra.com> wrote:

> thanks to all of those who posted. the links suffice.
>
> it's sort of a catch 22 problem.  all of the approaches require that i
> become user 'admin' at some point.  therein lies the problem.  they don't
> know the admin password and can't find the install cd which allows you to
> reset the password.
>
> fyi, the simplest approach for those that want to know how to run root cmds
> on mac os is the one specified below.
>
> once you login as 'admin' you don't have to enable root account. you can
> simply  use 'sudo' as described below.  not the best if you have to run lots
> of cmds but for one offs this is the best approach imho.  it leaves the
> system more locked down to prevent accidents by users that don't know what
> they're doing.
>
> thanks
>
>
> Jim Buzbee wrote:
>
>> On Thu, 5 Jun 2008 dio2002 at indra.com wrote:
>>
>>  any mac users out there?
>>>
>>>
>>> what is the mac account that gets you root access?
>>>
>>
>> You want to use "sudo" from an account with "admin" privs, i.e.:
>>
>> # sudo vi /etc/hosts
>>
>> As to whether editing the host file is a good thing, that's another story.
>>
>>
>> Jim
>>
>>
>>
>> --------------------------------------------------------------------------------
>> Jim Buzbee                              "I was gratified to be able to
>> jbuzbee at nyx.net                         answer promptly, and I did. I
>> http://batbox.org                       said I didn't know."   Mark Twain
>>
>> _______________________________________________
>> Web Page:  http://lug.boulder.co.us
>> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
>> Join us on IRC: lug.boulder.co.us port=6667 channel=#colug
>>
> _______________________________________________
> Web Page:  http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
> Join us on IRC: lug.boulder.co.us port=6667 channel=#colug
>



-- 
Jason Vallery
jason at vallery.net

mobile: +1.720.352.8822
home: +1.303.993.3712
web: http://vallery.net/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20080605/be6eff20/attachment.html>


More information about the LUG mailing list