Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

net rpc join

Status
Not open for further replies.

KCV

Programmer
Aug 11, 2004
20
US
I need to join my box to the domain, but thru a program and not from command line. Is there a call equivalent to net rpc join that will do the job or should I do system("net rpc join ****"); ?
 
Forking a shell to execute the command line should be OK.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
How to pass the password in the shell command? net rpc join MyDomain -U Administrator --- ????????
 
What is your programming language ? C ?
I quite don't understand where you're stuck:
system("same thing as if you typed from command line")
If you have variables then you may consider the sprintf function.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
I don see an option in net help that lets u pass password? Or I am not seeing properly? We wait for it prompt for password when we type from command line.
 
And this ?
-U Administrator%password

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Thanks, I did know we can pass password like that.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top