Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 04 Aug 2003 16:37:53 -0400
From:      Justin Burdine <justin@cyburdine.com>
To:        Bob Collins <bob@anything-inc.com>
Cc:        questions@FreeBSD.ORG
Subject:   Re: Samba and $
Message-ID:  <3F2EC421.9050907@cyburdine.com>
In-Reply-To: <5.2.0.9.0.20030804162429.00adbc98@mail.anything-inc.com>
References:  <5.2.0.9.0.20030804162429.00adbc98@mail.anything-inc.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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@freebsd.org mailing list
>> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
>> To unsubscribe, send any mail to 
>> "freebsd-questions-unsubscribe@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@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to 
> "freebsd-questions-unsubscribe@freebsd.org"




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3F2EC421.9050907>