I tried using cpu to manage my LDAP with samba accounts
in it. I know samba can do LDAP itself, but for some
historical legacy reasons my current setup just doesn't
use LDAP itself. So I replaced in the machine add
script /usr/sbin/useradd with cpu useradd to let samba
add machine accounts to the LDAP server.
This, however, does not work as samba adds an $ to the
end of machine account user names. This way I cannot
remove such accounts using cpu as well. If I remove
the $ in a manual test all works well. As soon as
there is a $ in the login cpu acts as if it was not
given at all. I think this is incorrect, as the
original useradd unix tool is able to add such user.
example output:
# /usr/sbin/cpu useradd -d /dev/null -g machines -c
'Machine Account' -s /bin/false test_machine
User test_machine successfully added!
# /usr/sbin/cpu useradd -d /dev/null -g machines -c
'Machine Account' -s /bin/false test_machine$
usage: cpu user{add,del,mod} [options] login
usage: cpu group{add,del,mod} [options] group
usage: cpu cat
usage: cpu useradd [options] login
-c comment --gecos=COMMENT : Gecos
Information
-d home_dir --directory=home_dir : Users home
directory
-g initial_group --gid=initial : The group id
or name of the user's
initial
login group
-G group,[...] --sgroup=group,[] : A list of
supplementary groups
-k[skeleton_dir] --skel[=dir] : The skeleton
directory
-m --makehome : The user's
home directory will be
created if
it does not exist
-p[passwd] --password[=password] : The
unencrypted password
-s shell --shell=shell : The name of
the user's login shell
-u uid --uid=uid : The
numerical value of the user's
ID.
-X script --exec=script : Post add script
some (relevant?) version information:
# cpu --version
CPU 1.4.3
Written by Blake Matheny
Copyright 2001, 2002, 2003
2.6.9 linux kernel Gentoo
Logged In: NO
Idem with spaces or @... LDAP supports it, but CPU not.