HP-UX HB v13.00 Ch-20 - CIFS

HP-UX Handbook Rev 13.00 Page 24 (of 40)
Chapter 20 CIFS
October 29, 2013
/etc/passwd file and machine. account entries in the /var/opt/samba/private/smbpasswd
file. The following are the steps to create a machine account for a Windows client on a HP CIFS
Server acting as a PDC: create a new group called "machines" in the /etc/group file then create
the machine trust account for a Windows client in the /etc/passwd file.
groupadd machines
Create the machine trust account for a Windows client in the /etc/passwd file. For example, the
/etc/passwd entry for the Windows client named "CLIENT1" machine would be:
client1$:*:801:800:NT Workstation 1:/home/temp:/bin/false
Where 801 is a uid and 800 is the group id of a group called "machines". The machine account is
the machine name with a “$”appended. The home directory is /home/temp. The shell field in the
/etc/passwd file is not used and can be set to /bin/false. The same with the password, as it is set
to asterix you do not expect anyone to log in as client1. The suitable useradd command line is:
useradd -g machines -c "NT Workstation 1" -s /bin/false
-d /home/temp -u 801 client1\$
NOTE: useradd supports only 8 character names! Therefore if you want to use long netbios
names you need to edit the Unix passwd manually.
In addition to this you need to run the smbpasswd program to add a machine entry for a Windows
client to the /var/opt/samba/private/smbpasswd file:
smbpasswd -a -m client1
smbpasswd -e -m client1
NOTE: smbpasswd supports netbios-names up to 15 characters.
To remove a Windows client you need to delete it from /etc/passwd and use the following
smbpasswd commandline:
smbpasswd -x -m client1
To successfully join the Samba domain with a PC client you need to connect with a user from
smbpasswd that has the Unix-id "0"!
Configure Domain Users:
You can use useradd command to configure domain users, domain administrators and domain
guests on a samba PDC:
Create a "Domain Users" in the unixgroup users with unixname domuser:
useradd -g users -c "Domain Users" -s /usr/bin/sh domuser
Create a "Domain Administrators" in unixgroup adm with domadmin as unixname:
useradd -g adm -c "Domain Administrators" -s /usr/bin/sh domadmin
Create a account in the unixgroup guest (this might not be there yet) with unix name domguest