On 5/2/19 8:04 AM, Ted Unangst wrote:
> Nick Holland wrote:
>> > In a shell script invoked by doas, is it possible to find which user
>> > invoke the script? my search a the moment has come up empty.
>>
>> most likely place would be an environment variable, right?
>
>>
>> # echo "I started o
On Thu, May 02, 2019 at 04:29:20AM +, Adam Steen wrote:
>
> Hi
>
> In a shell script invoked by doas, is it possible to find which user
> invoke the script? my search a the moment has come up empty.
>
> Cheers Adam
>
Hi Adam,
Nowadays, I think the POSIX way is considered to be id(1) with
Nick Holland wrote:
> > In a shell script invoked by doas, is it possible to find which user
> > invoke the script? my search a the moment has come up empty.
>
> most likely place would be an environment variable, right?
>
> # echo "I started out as $LOGNAME"
> I started out as nick
Not
On Thu, May 2, 2019 at 20:17, Nick Holland wrote:
> On 5/1/19 10:28 PM, Adam Steen wrote:
>> Hi
>>
>> In a shell script invoked by doas, is it possible to find which user
>> invoke the script? my search a the moment has come up empty.
>
> most likely place would be an environment variable, right?
On 5/1/19 10:28 PM, Adam Steen wrote:
> Hi
>
> In a shell script invoked by doas, is it possible to find which user
> invoke the script? my search a the moment has come up empty.
most likely place would be an environment variable, right?
So ...
$ whoami
nick
$ doas -s
# whoami
On Thu, May 02, 2019 at 04:29:20AM +, Adam Steen wrote:
> Hi
>
> In a shell script invoked by doas, is it possible to find which user invoke
> the script? my search a the moment has come up empty.
>
> Cheers
> Adam
>
Investigate the owner of the shell's parent process:
ps -p $PPID -o user
If there is only one user running the script, can ps -A | grep "script_name"
work?
‐‐‐ Original Message ‐‐‐
On Wednesday, May 1, 2019 9:29 PM, Adam Steen wrote:
> Hi
>
> In a shell script invoked by doas, is it possible to find which user invoke
> the script? my search a the moment has
Hi
In a shell script invoked by doas, is it possible to find which user invoke the
script? my search a the moment has come up empty.
Cheers
Adam
8 matches
Mail list logo