Training, Open Source computer languages
PerlPHPPythonMySQLApache / TomcatTclRubyJavaC and C++LinuxCSS 
Search for:
Home Accessibility Courses Diary The Mouth Forum Resources Site Map About Us Contact
 
For 2023 (and 2024 ...) - we are now fully retired from IT training.
We have made many, many friends over 25 years of teaching about Python, Tcl, Perl, PHP, Lua, Java, C and C++ - and MySQL, Linux and Solaris/SunOS too. Our training notes are now very much out of date, but due to upward compatability most of our examples remain operational and even relevant ad you are welcome to make us if them "as seen" and at your own risk.

Lisa and I (Graham) now live in what was our training centre in Melksham - happy to meet with former delegates here - but do check ahead before coming round. We are far from inactive - rather, enjoying the times that we are retired but still healthy enough in mind and body to be active!

I am also active in many other area and still look after a lot of web sites - you can find an index ((here))
Getting OS X to look at local /etc/hosts

Posted by admin (Graham Ellis), 18 October 2002
Posting this here as I didn't find it easy to sleuth out this information and others who have just moved to Mac OS X may be wondering too.

Scenario - I don't run a local name service because I can't rely on any one or two machines always being on my network - we're a training company, various subnets go out on site, etc - so I have /etc/host files on every machine and an automated scheme to update them when a system happend to be in-house.   I want my OS X system to refer to its local /etc/hosts file, but
instead it's using lookupd, which doesn't use /etc/resolv.conf like other *nix operating systems ....

Solution:  Set up lookupd as follows:
     niutil -create . /locations/lookupd/hosts
     niutil -createprop . /locations/lookupd/hosts LookupOrder CacheAgent FFAgent NIAgent DNSAgent DSAgent
and (shock, horror) I then rebooted.   /etc/hosts now used because of the FFAgent (Flat File Agent) addition to the default.  Here's part of my /etc/hosts file, in case you need a reminder ...


Code:
##
# Host Database
#
# Note that this file is consulted when the system is running in single-user
# mode.  At other times this information is handled by lookupd.  By default,
# lookupd gets information from NetInfo, so this file will not be consulted
# unless you have changed lookupd's configuration.
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1       localhost
255.255.255.255 broadcasthost

# Hey - I HAVE changed lookupd!
#  niutil -create . /locations/lookupd/hosts
#  niutil -createprop . /locations/lookupd/hosts LookupOrder CacheAgent FFAgent NIAgent DNSAgent DSAgent
# Not sure about the last one - DSAgent v NILAgent ....

192.168.200.188 chopsuey spaniel
192.168.200.189 noodle mongrel
192.168.200.190 blackberry
192.168.200.191 bacon
192.168.200.192 eggs xterm
192.168.200.193 tea
192.168.200.194 toast
192.168.200.195 cornflake
192.168.200.196 milk
192.168.200.197 marmalade.wellho.co.uk marmalade
192.168.200.198 coffee



Posted by admin (Graham Ellis), 18 October 2002
Addendum to previous post  ...

The Flat File Agent is specified as F-F-A-g-e-n-t (without the hyphens).  I've entered the text directly in on the board, but some of the smart rendering tags are going funny things to it - it should NOt read Ff*gent !

Posted by admin (Graham Ellis), 24 November 2002
A "gem" from chatting with a geek at the MacExpo in London yesterday -  I'm told tha the graphic tools for administering the network information services are designed for (and work for) remote administration only. In other words, if you've only got the one Mac on your network running OSX  then you'll have to do the admin from the command prompt.

Posted by Custard (Custard), 11 October 2003
Ok, slightly off topic, and may change when I get Panther in a couple of weeks, but..

Have you ever got NFS mounts to work in OS X.
I have tried for hours at a time. I know the Solaris server is serving because I can mount from a Linux machine. (in fact I installed Linux by NFS from the sun)
Any ideas?


Posted by admin (Graham Ellis), 12 October 2003
I had a quick go "out the box", but it wasn't plug an play.   On my list of things to do whan I have some spare time (a.k.a. in the distant future at the moment!).  I'm suspecting I need to look into lookupd a lot further and there may be an answer in there with regards to configuration ... for I see

Code:
[Graham-Elliss-Computer:~/oct03] graham% ps aux | grep nfs
root     305   0.0  0.0     1296      0  ??  S    Fri06PM   0:00.00 nfsiod -n 4
root     306   0.0  0.0     1296      0  ??  S    Fri06PM   0:00.00 nfsiod -n 4
root     307   0.0  0.0     1296      0  ??  S    Fri06PM   0:00.00 nfsiod -n 4
root     308   0.0  0.0     1296      0  ??  S    Fri06PM   0:00.00 nfsiod -n 4
root     361   0.0  0.0     1296      0  ??  S    Fri06PM   0:00.00         (nfsd)
root     362   0.0  0.0     1296      0  ??  S    Fri06PM   0:00.00         (nfsd)
root     363   0.0  0.0     1296      0  ??  S    Fri06PM   0:00.00         (nfsd)
root     364   0.0  0.0     1296      0  ??  S    Fri06PM   0:00.00         (nfsd)
root     365   0.0  0.0     1296      0  ??  S    Fri06PM   0:00.00         (nfsd)
root     366   0.0  0.0     1296      0  ??  S    Fri06PM   0:00.00         (nfsd)
graham   881   0.0  0.0     1116      4 std  R+    7:03AM   0:00.00 grep nfs
[Graham-Elliss-Computer:~/oct03] graham%


which tells me it's up and running, just not configured!

Posted by John_Moylan (jfp), 19 October 2003
Accessing NFS is in Mac OSX Hack's from O'Reilly

http://hacks.oreilly.com/pub/h/341


Posted by admin (Graham Ellis), 19 October 2003
Thanks ... bought it last week, haven't had a chance to read it yet  

Posted by Custard (Custard), 20 October 2003
Cheers, I will probably get the next edition after Panther.

I have my order for Panther in already, and am hoping it lives up to it's promises of connectivity.
It's supposed to have much more support for networking (XWindows, Netbios etc.).
I had numerous looks on the net about getting NFS to work, all seemed over complicated relative to my Solaris or Linux machines.
Hopefully I will be able to finally get all my machines talking.

I'll post again when I get Panther....

B

Posted by Custard (Custard), 2 November 2003
Hi,

I have installed Panther now, and NFS is working fine.
Maybe there was something odd about my 10.1 install. hey ho.

FTPconnections from connect servers works nicely too.

Also the X11 support is great. I can run gimp on my Sparc, and use it on the mac now, which is fantastic.

And it's nice to see those spring-loaded folders back that I missed so horribly from mac os 9

Bruce

Posted by John_Moylan (jfp), 3 November 2003
On a related note Custard, how did your Panther install go? smoothly?

I hear there's a lot of graphical goodies in 10.3, friends of mine are raving about expose and the user switching (something I'm looking forward to as I share my powerbook with my wife)

Posted by Custard (Custard), 3 November 2003
Hiya,

The install was pretty smooth. I did have a glitch where the hard disk started hunting, and the install failed, but the second attempt was fine. I guess my HD is on the way out...

I haven't tried expose or user switching yet. I'll let you know when I get round to it. I've only got 1 user at the moment.

I like the icon thumbnail image preview thingy, which makes handling large directories of images easier.

Safari is nice, although some (nasty) web sites won't let me in, because it announces itself as other than IE. I haven't looked to see if you can change this like you can in opera.

There's a few things I don't like (call me picky) :-

The ftp url in the Finder's go menu only connects to an ftp server as read-only. To write it suggests safari or anothe application. I feel fleeced about that, and I don't understand why they did it.

The sidebar, I find annoying, but it's easily turned off.

I also don't like being railroaded into signing up for the .mac account on installation, although again you can ignore these.

I'm also uneasy about the first account on the system being the 'administrator'. Shouldn't the administrator always be root. And you don't seem to be able to log in as root. Maybe it's because I'm a unix person, but it feels a bit 'windowsy' to default to having a user account which can do anything to the system.

Of course these are only niggles.

Apart from that, I haven't seen anything overly exciting yet.  There are a lot of fixes and speedups, and some of the older utilities have been improved.

I will of course let you know when I do. After all, it has only been on my G4 for 2 days

Bruce

Posted by admin (Graham Ellis), 18 April 2005
The following reproduced (with permission) from an email exchange ...

Quote:
A "gem" from chatting with a geek at the MacExpo in London yesterday - I'm told tha the graphic tools for administering the network information services are designed for (and work for) remote administration only


The geek is misinformed.  Here's how I add users, NFS-mounts, groups, etc.:

- edit the appropriate flat-file
- use 'niload' to update the NetInfo DB.
- If I have changed an /etc/passwd entry,
  I have to use the GUI to repair the shadow hash

I use the GUI NetInfo Mgr only when I have to, because it's so #$%^#$% clumsy.  But when I use it, it works fine.

I do like to keep my things in the NIDB, rather than the flat files in /etc, however--it's only the GUI I don't like.

I am on 10.3.8 (but I've been doing it this way since 10.0)

(Signed) Another geek



This page is a thread posted to the opentalk forum at www.opentalk.org.uk and archived here for reference. To jump to the archive index please follow this link.

You can Add a comment or ranking to this page

© WELL HOUSE CONSULTANTS LTD., 2024: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • FAX: 01144 1225 793803 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho