problem retaining username
Andrew Solomon
andrews at it.uts.edu.au
Sun Sep 8 03:08:06 EDT 2002
I apologise if this question is already answered and I just don't
understand it:
TASK: I want to write a script, called by any user,
which creates a file owned by root in a directory owned by root.
e.g user types
sudo timestamp.sh
and timestamp does
touch /root/<loginname>.timestamp
PROBLEM: I'm having two problems.
1) the script timestamp.sh is owned by root with permissions 700
but with the following line in my sudoers:
andrews machname=/bin/timestamp.sh !set_logname
I get the message
Sorry, user andrews is not allowed to execute '/bin/timestamp.sh'
as root on machname.it.uts.edu.au.
What am I doing wrong?
2) If I *were* able to execute /bin/timestamp.sh
as root but with $USER unchanged by sudo, I would worry that
the person executing
sudo /bin/timestamp.sh
had tampered with their $USER variable. Is there any way of ensuring
this had not been done?
best wishes,
Andrew
--
Faculty of IT, UTS http://www-staff.it.uts.edu.au/~andrews/
Broadway, NSW 2007, Australia phone:+61.2.9514 7938
CRICOS Provider 00099F room:UTS blg 10/4.433
More information about the sudo-users
mailing list