-
- Enthusiast
- Posts: 30
- Liked: 1 time
- Joined: Sep 03, 2010 4:44 pm
- Full Name: Jeff MacDonald
- Contact:
Which user do Linux scripts run as
Topic says it all, do linux scripts run as the root user, or as the user that ssh'd in ?
-
- Product Manager
- Posts: 14726
- Liked: 1707 times
- Joined: Feb 04, 2013 2:07 pm
- Full Name: Dmitry Popov
- Location: Prague
- Contact:
Re: Which user do Linux scripts run as
Jeff,
root should work.
root should work.
-
- Veteran
- Posts: 635
- Liked: 174 times
- Joined: Jun 18, 2012 8:58 pm
- Full Name: Alan Bolte
- Contact:
Re: Which user do Linux scripts run as
Are you asking how to set the account for prefreeze/post-thaw scripts? The job will either use the account specified in the main guest processing page of the job settings, or the credentials you set for specific VMs after clicking the "Credentials..." button.
-
- VP, Product Management
- Posts: 27377
- Liked: 2800 times
- Joined: Mar 30, 2009 9:13 am
- Full Name: Vitaliy Safarov
- Contact:
Re: Which user do Linux scripts run as
You can enable native VMware Tools quiescence to execute these pre-freeze/post-thaw scripts as well. Here is a bit more more information about this.
-
- Enthusiast
- Posts: 30
- Liked: 1 time
- Joined: Sep 03, 2010 4:44 pm
- Full Name: Jeff MacDonald
- Contact:
Re: Which user do Linux scripts run as
Well, I have it as a non root account that gets elevated via sudo. Which means it logs in as a user name veeam, and then sudos to root.
The part I'm not sure of is if it for pre/post scripts if it gets sudo'd or if it tries to run as vim. I'll just write a script to spit out the effective UID/GID to see what is up.
@Vitaliy S. - Thanks!.
The part I'm not sure of is if it for pre/post scripts if it gets sudo'd or if it tries to run as vim. I'll just write a script to spit out the effective UID/GID to see what is up.
@Vitaliy S. - Thanks!.
-
- Enthusiast
- Posts: 30
- Liked: 1 time
- Joined: Sep 03, 2010 4:44 pm
- Full Name: Jeff MacDonald
- Contact:
Re: Which user do Linux scripts run as
The answer is root
Mind you, the job is still failing with "timed out waiting for script to finish execution" but I'll start another thread on that
Code: Select all
#!/bin/bash
echo uid is $UID >> /tmp/uid
echo euid is $EUID >> /tmp/uid
exit 0
ssh over to the VM and....
ls -l /tmp/uid
-rw-r--r-- 1 root root 19 Jul 16 09:44 /tmp/uid
cat /tmp/uid
uid is 0
euid is 0
Who is online
Users browsing this forum: No registered users and 41 guests