| Click here to select a new forum. |
| Netatalk: changing “Workstation” |
Posted by: pl212 on 2024-08-16 22:02:26 In certain older AppleTalk network visualization software packages such as Trawl and GraceLAN, the machine type (“Macintosh SE/30“) determines what icon is used for a node on a network. By default, netatalk seems to send “Workstation”, and I’m curious if there’s a best practices way to change this?
(This is similar to people with a Synology who want their NAS to show up as an XServe over Bonjour, I suppose… but a few decades older.) |
Posted by: slipperygrey on 2024-08-17 01:10:06 Netatalk ships two tools - nbprgstr and nbpunrgstr - that registers and unregisters NBP names on the AppleTalk network, respectively. The technical reason you are seeing the "Workstation" NBP name for your server, is because the particular init script you're using runs nbprgstr after launching atalkd.
The easy way to change this is to re-run nbprgstr with a different NBP name as parameter after atalkd has started up (and probably nbpunrgstr too, in order to get rid of the NBP name you don't want.) The drawback is that you have to do this every time you launch Netatalk.
In order to make a permanent change, you have to modify the init script in question. If you're using the systemd init system, for instance, your atalkd.service unit file will look something like this:
[Unit]
Description=Netatalk AppleTalk daemon
Documentation=man:atalkd(8) man:atalkd.conf(5) man:nbp(1)
Documentation=https://netatalk.io/
After=network-online.target
[Service]
Type=forking
GuessMainPID=no
ExecStartPre=/bin/sh -c 'systemctl set-environment ATALK_NAME=$$(hostname|cut -d. -f1)'
ExecStart=/usr/local/sbin/atalkd
ExecStartPost=-/usr/local/bin/nbprgstr -p 4 "${ATALK_NAME}:Workstation"
ExecStartPost=-/usr/local/bin/nbprgstr -p 4 "${ATALK_NAME}:netatalk"
ExecStop=-/usr/local/bin/nbpunrgstr "${ATALK_NAME}:Workstation"
ExecStop=-/usr/local/bin/nbpunrgstr "${ATALK_NAME}:netatalk"
Restart=always
RestartSec=1
[Install]
WantedBy=multi-user.target
Modify the ExecStartPost and ExecStop lines, then run systemctl daemon-reload, and you should be good to go.
As a side note, Netatalk 2.x can also do the Bonjour Xserve trick if you put "-mimicmodel RackMac" in your afpd.conf. 🙂 |
Posted by: pl212 on 2026-02-16 09:48:39 Belated note to say thanks for this -- it works great! 🙂 |
Posted by: adespoton on 2026-02-18 12:00:03
As a side note, Netatalk 2.x can also do the Bonjour Xserve trick if you put "-mimicmodel RackMac" in your afpd.conf. 🙂 You can swap out RackMac for any icon name in the icon set, can't you? I usually use RackMac, but I seem to recall setting it to Time Machine at one point. |
Posted by: slipperygrey on 2026-02-18 12:08:31
You can swap out RackMac for any icon name in the icon set, can't you? I usually use RackMac, but I seem to recall setting it to Time Machine at one point. That's right, you can use any of the device model codes defined in the macOS system file /System/Library/CoreServices/CoreTypes.bundle/Contents/Info.plist
For instance, if you want to impersonate a Trashcan Mac Pro you can use the code "MacPro6,1" |
Posted by: pl212 on 2026-09-10 20:04:42 Just a note in case it's of interest to others: We can also get the timelord dæmon to use a case-sensitive, AppleTalk-esque machine name, instead of the unix hostname:
ExecStart=/usr/local/sbin/timelord -l -n "AppleShare Server" |
Posted by: bmwcyclist on 2026-10-06 05:47:59 I'm working on a small System 7 extension so a Lisa running MacWorks Plus shows up on AppleTalk as "Macintosh XL" instead of "Macintosh Plus".
What I've found so far with nbplkup:
- Every Mac registers <name>:Workstation on socket 4.
- It also registers <name>:<model>, e.g. "Macintosh IIsi", on socket 253.
- The model name is already registered before extensions load.
Two questions:
1. Which part of System 7 registers the model name, and where does it get the string? Is this documented anywhere?
2. Do network scanners show whatever is registered on socket 253, or do they only recognize a fixed list of model names?
Any pointers appreciated. |
Posted by: robin-fo on 2026-10-06 05:56:58 This is part of what the System 6 „Responder“ extension was used for. It was integrated in System 7. System 7.5 and above no longer register the model name, but „ Macintosh“ or „ Power Macintosh“ (note the spaces) instead.
Hasn‘t the XL its own model identifier and reports as „Macintosh XL“ or „Macintosh XL Plus“?
Check my System Information Protocol thread here for reference
Everything I just wrote is from memory and not double-checked… |
Posted by: robin-fo on 2026-10-06 05:58:17 |
| 1 |