I haven't done this for a while but here's my notes from the ibm site....
# /usr/sbin/useradd -g machines -d /dev/null -c "machine id" -s /bin/false machine_name$
# passwd -l machine_name$
Changing password for user machine_name$
Locking password for user machine_name$
The first command creates the user machine_name (don't forget the dollar-sign; it's required and identifies the entry as a trust account)), as a member of the group machines (-g), with no home directory (-d /dev/null), a descriptive entry (-c; for example, "Tom's Notebook"), and no shell access (-s /bin/false). The second command creates a "secret" for the machine to authenticate against.
With the UNIX account created, we can now add the machine to /etc/samba/smbpasswd as shown below:
# smbpasswd -a -m machine_name
Added user machine_name$