Pre and Post Script - run as different user

Availability for the Always-On Enterprise

Pre and Post Script - run as different user

Veeam Logoby AndyK_UK » Tue Oct 24, 2017 6:16 pm

Hi,

First time poster, running evaluation of Veeam.
We currently have Backup Exec.

I've come across an issue and my Veeam contact suggest I post on here!

I run pre and post scripts, on my backup exec server they run on the remote system - IE I specify \\server\share\prescript.bat

The script runs as the service account which the Backup Exec services run as (a domain account)

As Veeam runs as local system, the batch files also seem to run as this.
Therefore that account does not have access to the remote server share.

I've currently worked around this by adding the veeam server computer account as a local admin on the remote server.

I don't really like this as a workaround, any suggestions in how to have the script run as a different account?

Thanks in advance

Andy
AndyK_UK
Novice
 
Posts: 3
Liked: never
Joined: Tue Oct 24, 2017 6:04 pm

Re: Pre and Post Script - run as different user

Veeam Logoby vClintWyckoff » Tue Oct 24, 2017 8:04 pm

Quickly thinking off the top of my head but psexec allows you to run batch files with different username / password combinations whereas runas does not. Just make sure that psexec is installed on the target computer.
vClintWyckoff
Expert
 
Posts: 500
Liked: 109 times
Joined: Sat Oct 27, 2012 1:22 am
Location: Technical Evangelist
Full Name: Clint Wyckoff

Re: Pre and Post Script - run as different user

Veeam Logoby AndyK_UK » Tue Oct 24, 2017 8:10 pm

Hi
Thanks for the reply.
I did think about that. But if rather not have the username and password innplain text in a file.

If the script does rum as the service account I'd prefer to change that to a domain account but I'm not sure if there is anything more to it apart from changing the details against the services

Thanks

Andy
AndyK_UK
Novice
 
Posts: 3
Liked: never
Joined: Tue Oct 24, 2017 6:04 pm

Re: Pre and Post Script - run as different user

Veeam Logoby vClintWyckoff » Tue Oct 24, 2017 8:35 pm

I’m completely with you on that one. You could however only have the username in the Veeam job, something like:

Code: Select all
Psexec \\computername -u user p password


But that still has the secret in the Veeam job, so not the best but it’s atleast not it on your server.
vClintWyckoff
Expert
 
Posts: 500
Liked: 109 times
Joined: Sat Oct 27, 2012 1:22 am
Location: Technical Evangelist
Full Name: Clint Wyckoff

Re: Pre and Post Script - run as different user

Veeam Logoby vClintWyckoff » Tue Oct 24, 2017 8:53 pm

Actually, enable guest processing, choose the right user from credential manager and then on the last tab of the actual application aware image processing you’ll see scripts...this should do the trick. Here’s the how to link.

https://helpcenter.veeam.com/docs/backup/vsphere/pre_post_scripts.html?ver=95
vClintWyckoff
Expert
 
Posts: 500
Liked: 109 times
Joined: Sat Oct 27, 2012 1:22 am
Location: Technical Evangelist
Full Name: Clint Wyckoff

Re: Pre and Post Script - run as different user

Veeam Logoby AndyK_UK » Wed Oct 25, 2017 7:00 pm

Hi
Thanks for the reply. I will check that out. When I tried pre and post thaw scripts earlier in the real, the pre worked fine, then the snapshot was taken but as soon as the snapshot creation competed the post thaw ran, I thought it should surely run when the snapshot is removed after the backup has competed?

Thanks

Andy
AndyK_UK
Novice
 
Posts: 3
Liked: never
Joined: Tue Oct 24, 2017 6:04 pm


Return to Veeam Backup & Replication



Who is online

Users browsing this forum: Bing [Bot] and 1 guest