Samba and $
Justin Burdine
justin at cyburdine.com
Tue Aug 5 07:36:34 PDT 2003
hmm, try using the pw command to create your users. This is the command
line version of adduser and enables you to create users with a $.
I use the following script to quickly add machine trust accounts...
hope it helps.
#----- begin script -----#
#!/bin/csh -f
set MNAME = $1
set MGID = 201
set MUID = `cat muid`
/usr/sbin/pw useradd ${MNAME}$ -g 201 -u $MUID -c ${MNAME} -d /dev/null
-s /usr/bin/false
/usr/local/bin/smbpasswd -a -m ${MNAME}
@ MUID ++
echo $MUID > muid
#----- end script -----#
note that it calls a file "muid" which contains the currently availble
machine trust uid. I started at 10000 and am now at 10050. To create
this file just do the following in the same directory that this script
is in:
echo 10000 > muid
the usage is:
mtrust {machine_name}
no need to add the dollarsign on the command line as the script adds it
for you.
BTW: I am no script genius... as I am sure is quite obvious. ;)
-Justin
Bob Collins wrote:
> At 02:07 PM 8/4/2003 -0500, gfsd wrote:
>
>> Why can't i create a user with a $ on the end? For machine trust
>> accounts i need to add each one by hand, instead of on the fly
>> creation. When I use adduser it will not let me add a user with a $
>> on the end, is there a way around that?
>> _______________________________________________
>> freebsd-questions at freebsd.org mailing list
>> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
>> To unsubscribe, send any mail to
>> "freebsd-questions-unsubscribe at freebsd.org"
>
>
>
> That is to be expected in FreeBSD and Samba. It is in the notes. So,
> what you do, is make your user. The edit, by hand, the password file.
> vipw is the command to use. Add the $ and save the file.
>
> No real way around it that I know of.
>
> -- Bob
>
> NOTICE TO BULK E-MAILERS: Pursuant to US Code, Title 47, Chapter 5,
> Subchapter II, 227, and all unsolicited commercial e-mail sent to this
> address is subject to a download and archival fee in the amount of
> $500 US
>
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to
> "freebsd-questions-unsubscribe at freebsd.org"
More information about the freebsd-questions
mailing list