Mark Minasi's Reader Forum
Mark Minasi's Reader Forum
Home | Profile | Register | Active Topics | Active Polls | Members | Search | FAQ | Minasi Forum RSS Feed
 All Forums
 HALP! Questions on Windows and Windows Server
 Active Directory
 single-use AD account

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Note: please do not cross-post.
Cross-postings will be deleted and ignored.
Thanks for helping to keep this forum junk-free!
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
mazaffar Posted - 06/14/2012 : 03:38:39 AM
Hello,
is there a tool that will generate an alpha numeric string that can be used to create an AD account automatically?

For eg, I imagine setting up a task that will run the tool, output the string to a file and run another task that will create an account in AD using that string as the u/n and p/w.

Thanks,
Mazaffar.
10   L A T E S T    R E P L I E S    (Newest First)
mazaffar Posted - 06/15/2012 : 06:57:49 AM
quote:
Originally posted by Pieter

>> Is the -f switch for the computername from where you are running the blat?
Yes.

Things to consider:
- anti-virus that blocks SMTP (McAfee does by default)
- your exchange must accept your client to send smtp mail
- firewall
...



i created a new receive connector but it still said it does not like sender name.
Mazaffar
Pieter Posted - 06/15/2012 : 03:16:30 AM
>> Is the -f switch for the computername from where you are running the blat?
Yes.

Things to consider:
- anti-virus that blocks SMTP (McAfee does by default)
- your exchange must accept your client to send smtp mail
- firewall
...
mazaffar Posted - 06/15/2012 : 03:10:36 AM
Thanks for your help so far.

It says:
***Error*** The SMTP does not like sender name
***Error*** Have you set your mail address correctly.

When I ommit the -f switch blat is unable to the registry key. I think it wants me to use the -install switch but i would rather not. Is the -f switch for the computername from where you are running the blat?

Thanks,
Mazaffar
Pieter Posted - 06/14/2012 : 10:29:06 AM
blat.exe "C:\file.txt" -server MySmtpServer -f "%COMPUTERNAME%" -to MyEmail@domain.com -subject "This is the subject" -attach "C:\attachment.txt" -ti 10 -try 3

I never use the -install switch
mazaffar Posted - 06/14/2012 : 10:11:17 AM
i get unknown error code 2 when trying to open file filename.

The file is in the same directory as the blat.exe. I have done the -install bit and told it the exchange server hostname.

Could i have an example please?
Mazaffar
Pieter Posted - 06/14/2012 : 09:10:46 AM
>>how to output the password to a fileunfortunately the 'net use' command doesn't show it in his output.

You could make a script :
set $USER=test%random%
Set $PW=PW%random%
echo Creating %$USER% with password %$PW%
net USER test%$USER% PW%$PW% /ADD /DOMAIN


Save the above lines with CMD as extension and run it (elevated prompt on a DC !).

If you want the usernames and password logged in a file, add this
echo %$USER%; %$PW% >> file.log


>> Is it possible to automatically email the password to the user?
It is possible, but it will take some work. I always use blat.exe in my script to send a mail.


PS: I didn't test the above script.

mazaffar Posted - 06/14/2012 : 08:58:05 AM
net USER test%random% PW%random% /ADD /DOMAIN

I tried this, specifying a username. The account was created with a random password. I don't know how to output the password to a file.
Is it possible to autmatically email the password to the user?

Mazaffar
Pieter Posted - 06/14/2012 : 05:43:23 AM
>> find out.
No.

Since you create the user yourself and give it a PW yourself, you know it ;-)

example:
net USER test%random% P@ssw0rd /ADD /DOMAIN
=> password is P@ssw0rd for all users

net USER test%random% PW%random% /ADD /DOMAIN
=> password is PWnnnn where nnnn is NOT the same random number as the user. You have to verify the output from 'net use' to know the PW.




mazaffar Posted - 06/14/2012 : 05:12:30 AM
quote:
Originally posted by Pieter
[Run it as a domain Administrator.
The %random% variabel will be translated to a random generated number.




Is it possible to find out what the password is so the user can be informed?
Thanks.
Pieter Posted - 06/14/2012 : 03:45:06 AM
Probably the most old fashion way is this :
net USER test%random% password /ADD /DOMAIN

Run it as a domain Administrator.
The %random% variabel will be translated to a random generated number.


Mark Minasi's Reader Forum © 2002-2011 Mark Minasi Go To Top Of Page
This page was generated in 0.08 seconds. Snitz Forums 2000