Search Results

Search: Posts Made By: crematoriumm
1,946
Posted By crematoriumm
Sudo log
Hello,

Is it possible to configure the sudo log to register the logname instead of
the username?
I mean, if user A logs and su (switch user) to user B and then uses SUDO
to execute commands,...
9,257
Posted By crematoriumm
Making it.... ps -ef | grep $PPID | sort |...
Making it....

ps -ef | grep $PPID | sort | head -1 | awk '{ print $NF }'

server01:/var/tmp$ /var/tmp/k1.sh
/var/tmp/k1.sh

[]s,

Cremm.
9,257
Posted By crematoriumm
Making it simpler, after reading Vino's answer...
Making it simpler, after reading Vino's answer slowly....


v=$PPID
ps -ef | grep $v | sort | head -1 | cut -d" " -f14


[]s,

Cremm.
9,257
Posted By crematoriumm
fpmurphy, your solution didn't work for me....
fpmurphy,

your solution didn't work for me. Check it out.....

server01:/var/tmp$ /var/tmp/k1.sh
pts/27
0:00
0:00
pts/101
?
?
?
pts/15
pts/15
pts/27

Thanks anyway for your help,...
9,257
Posted By crematoriumm
Vino, I can't use the solutions 1 and 2 for...
Vino,

I can't use the solutions 1 and 2 for security reasons, but the third solution sounds to be great.

I did this:

The code:

#!/bin/ksh
var1=`echo $$`
echo "k2.sh pid => " $var1 ##...
9,257
Posted By crematoriumm
How to identify the calling script?
Hi,

I have two scripts ( /tmp/k1.sh and /tmp/k2.sh ).
k1.sh calls the k2.sh .
For security reasons, I must be sure that the k2.sh is being called by the k1.sh .
Is it possible for the k2.sh...
Showing results 1 to 6 of 6

 
All times are GMT -4. The time now is 06:12 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy