Hello

There is no way to change the user that packer uses.


my suggestion was


connect with the normal user
run the join network
reboot

then as the normal user, using runas run a 2nd script as the domain user
you require.

Alvaro


On Mon, Mar 26, 2018 at 1:58 PM, Sim <[email protected]> wrote:

> I think you might misunderstand the problem. I was running Packer on
> windows, the temporary vm generated by packer during the build process
> created its own run-time local admin account to run a whole bunch of script
> and config based on what defined in the template.
> I was trying to find a way to log the local admin user of the TEMPORARY VM
> with domain active directory user instead of using the default local admin
> user which has restricted access to the domain network's resources even the
> VM has or hasn't been added into the domain. Hopefully, my explanation is
> clear enough. Thank you.
>
> On Monday, March 26, 2018 at 6:11:32 PM UTC+11, Alvaro Miranda Aguilera
> wrote:
>>
>> Same as you weren't using packer.
>>
>> If this is windows try "run as" as part of the script.
>>
>> Or use user/pass authentication on the remote resource.
>>
>> Alvaro.
>>
>> On Sun, Mar 25, 2018 at 2:44 PM, Sim <[email protected]> wrote:
>>
>>> I have added some variables in Packer Azure template so that the
>>> temporary VM could be added to the Azure virtual network group, so it can
>>> reach other servers in our internal network. However, it still could not
>>> access the server's resources (it could ping them with IP addresses) even
>>> after being added to the domain by the scripting to be run during packer
>>> build. I found out that it was probably because the local admin user of
>>> that temporary VM was not in the AD and couldn't access other servers to
>>> get the resources (technical credentials of AD user will be asked to enter
>>> to be able to get access). So, just wondering is there any other ways that
>>> we could log Packer as our AD user in the temporary VM during the build to
>>> avoid this kind of access permission issues?
>>>
>>> Thank you
>>>
>>> --
>>> This mailing list is governed under the HashiCorp Community Guidelines -
>>> https://www.hashicorp.com/community-guidelines.html. Behavior in
>>> violation of those guidelines may result in your removal from this mailing
>>> list.
>>>
>>> GitHub Issues: https://github.com/mitchellh/packer/issues
>>> IRC: #packer-tool on Freenode
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "Packer" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To view this discussion on the web visit https://groups.google.com/d/ms
>>> gid/packer-tool/33e404f2-3857-486d-ac04-985958d992ad%40googlegroups.com
>>> <https://groups.google.com/d/msgid/packer-tool/33e404f2-3857-486d-ac04-985958d992ad%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> --
>> Alvaro
>>
>> --
> This mailing list is governed under the HashiCorp Community Guidelines -
> https://www.hashicorp.com/community-guidelines.html. Behavior in
> violation of those guidelines may result in your removal from this mailing
> list.
>
> GitHub Issues: https://github.com/mitchellh/packer/issues
> IRC: #packer-tool on Freenode
> ---
> You received this message because you are subscribed to the Google Groups
> "Packer" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/packer-tool/61090666-e30d-4b7b-a789-0903bc4c7487%40googlegroups.com
> <https://groups.google.com/d/msgid/packer-tool/61090666-e30d-4b7b-a789-0903bc4c7487%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Alvaro

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/CAHqq0eyWiihHDv6Mc9bmmGEQWGVjQ_-o3Wp3xr2Q%2BCCt1fo%3Dsw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to