[Samba] samba domeinlogon

Daniel T. Bender h4rv3st at web.de
Fri Sep 6 14:52:01 GMT 2002


> I added several users to smbpasswd (which are real users on the server. I
> would like to have "virtual users" which don't have a real account but
> that's an other problem)
>
> In several howto's I was told to add trusted w2k machines with the
> following instruction:
>
> useradd --g smbuser --d /dev/null --s /dev/null ntclient$
> Now add it to the password database
> smbpasswd -a -m ntclient (the $ at the end is not required)
>
> Freebsd can not add an account with a "$" nevertheless I made the account
> and tried smbpasswd -a -m ntclient
> I did get the following error (also when I changed the name in my passwd
> with a $)
>
> User ntclient$ does not exist in system password file (usually
> /etc/passwd). Cannot add account without a valid local system user.
> Failed to modify password entry for user ntclient$

this is a FreeBSD problem, the system can handle usernames with trailing $
but the useradd/pw wont accept it.
i run Samba on FreeBSD 4.6, and my solution is simply add the user without
the $ at the end and then use "vipw". this opens the master.passwd file, you
can apply whatever changes you need (adding the trailing $ to the usernam
for the machine). then save/exit and vipw will automatically update all
neccesary other files/passwd databases.
as this is somehow a long procedure for every machine to add, i edit the
master.passwd file via a python-script (well, i wrote a whole python-script
for managing the users (local and samba) and machine accounts) and run
??make_db?? ... or something. this will generate all the other database
files i.e. /etc/passwd.

then you can add your machine to samba via smbpasswd -a -m machinename

Daniel T. Bender
--
free your mind
and your ass will follow




More information about the samba mailing list