Options of setup someone to execute a script as my id.


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Options of setup someone to execute a script as my id.
# 1  
Old 12-09-2009
Options of setup someone to execute a script as my id.

Hi I would really appreciate your help:

First I knew there are a few ways to do it:
1. Best is to set up sudoer...I'd like to see this as the last resort...there's a good reason for that ...

2. use setuid command, but that command needs to be a binary executable, while my command is a shell script. Convert it to executable is hard because the box is an AIX 5.3 and I cannot convince management to by a C compiler which is required by the converting util which I download from internet. Plus it's hard to get it work as so far I haven't seen any one get it working on AIX5.3.

3. I thought of some existing command(that can execute a shell script, live eval) that I may be able to use setuid trick ...but that doesnot work either cause they are kernal commands...

My situation is, I got a regular non-root AIX user id, and security is not much of a concern(from my side), I just want to make someone else can execute that shell script so they won't need to bug me for that everyday... Another reason is, I cannot let them run as their ids cause that script would generate files that other id cannot access.

Your valuable input is much appreciated..


TheGunMan.

Last edited by TheGunMan; 12-09-2009 at 04:29 PM.. Reason: more info.
# 2  
Old 12-09-2009
I would first suggest setting up a group with all of the users you want to be able to execute the script. chgrp the script and log files to the name of the group, then chmod g+x the script, and chmod g+w the log files.

Or, you may want to look into AIX RBAC
# 3  
Old 12-09-2009
Thanks Erice for your reply...But:
1. I cannot make any user/group changes as it's tons of paper work and a complicated process... if the procedure is easy, I'd have gone the route of getting them setup as my id's sudoer to execute the script only.

2. Even I did what you said, the log files gened by the script would still be under their name which is not what I want.

I'll still prefer a solution that would enable them to run the script under my id....
# 4  
Old 12-09-2009
ksh93 comes with a shell compiler (shcomp). You could download ksh93 and give that a try if it isn't on your box yet.
# 5  
Old 12-11-2009
Scrutinizer -could you please give me details?

...ksh93 is there but it doesnot recognize shcomp...

SUDO: /home/pzwl0>cd /usr/bin
SUDO: /usr/bin>ls ksh*
ksh ksh93
SUDO: /usr/bin>ksh93
SUDO: /usr/bin>shcomp
ksh93: shcomp: not found.
SUDO: /usr/bin>
# 6  
Old 12-11-2009
Hi, you should be able to download the AIX version here, if it is not on your system:
INIT package
ast-ksh
Binary Package Installation Instructions
# 7  
Old 12-14-2009
Thanks a ton Scrutinizer !!

I'll definitely try your links, although due to time constraint I browsed them a little bit for now and don't get what it is actually nor if it's something I need to or to do with AIX....

I'll spend more time on the links and may bug you later...

Regards,
thegunman

---------- Post updated at 09:45 AM ---------- Previous update was at 09:45 AM ----------

Thanks a ton Scrutinizer !!

I'll definitely try your links, although due to time constraint I browsed them a little bit for now and don't get what it is actually nor if it's something I need to or to do with AIX....



I'll spend more time on the links and may bug you later...



Regards,

thegunman
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Script to iterate over several options

Have two 3 files which has list of servers,users and location and base url which is common on every server A = server1 server2 server3 B = user1 user2 user3 C = dom1 dom2 dom3 baseurl=/opt/SP/ and what i have to achieve is below via ssh from REMOTE SERVER for it's first iteration it... (7 Replies)
Discussion started by: abhaydas
7 Replies

2. Shell Programming and Scripting

shell script options

one thing i was trying to figure out is if you can give people the option to choose what they want to do in a shell script. for example, let's just say that you have a simple shell script to install a couple of programs, can you make it to where you can press a certain key to install a certain... (1 Reply)
Discussion started by: hotshot247
1 Replies

3. UNIX for Dummies Questions & Answers

[solved] Script creation (how to include options in the script)

Hi guys i have written a script which takes the options given to him and execute itself accordingly. for example if a script name is doctortux then executing doctortux without option should made doctortux to be executed in automatic mode i.e. doctortux -a or if a doctortux is needed to run in... (4 Replies)
Discussion started by: pinga123
4 Replies

4. Shell Programming and Scripting

Passing options into a script

Afternoon all, I have been writing a script to do some selects on a table dependent on what options are selected when the script is run: #!/bin/ksh set -x set -m if then echo "usage: msglog.ksh -da <date and time> -i <interface> -m <msg> -di <direction> -mi <MIR>" exit 1 fi... (3 Replies)
Discussion started by: chris01010
3 Replies

5. Shell Programming and Scripting

Help with options and arguments to a script

I'm trying to write a script that accepts both arguments and options, e.g. ./script -h 1 -m 15 -s 30 or ./script -h 1 -m 15 -s 30 I'd like for any of the arguments and options to be optional, and the option values should be numerals only. I've tried both getopt and getopts but I... (1 Reply)
Discussion started by: Ilja
1 Replies

6. Solaris

How to run a script with options

I have a script name as psin_install_i3fp.sh I need to run this script like ./psin_install_i3fp.sh step2 What this step2 represents? my script contains data: #!/bin/ksh mkdir logs >> /dev/null 2>&1 ./infra/bin/psin_stop_ba.sh mv ./psin_start_ba.sh... (2 Replies)
Discussion started by: pmrajesh21
2 Replies

7. AIX

NIM server setup on etherchannel setup environment

I know that IBM's official stance is that NIM does not work on etherchannel environment, but has anyone able to get around it? I'm working on a p5-590 LPAR system, and the NIM master and clients are all on the same frame. Any help is appreciated. (1 Reply)
Discussion started by: pdtak
1 Replies

8. Shell Programming and Scripting

Passing options to a bash script

I'm just not sure where to start looking into this. I want to be able to create switches for my script. Back in the day I'd make my scripts interactive...you know: echo "what report do you want" echo "A)boxes with errors" echo "B)boxes with more than 5 errors" echo "C)Service groups that have... (3 Replies)
Discussion started by: DeCoTwc
3 Replies

9. Shell Programming and Scripting

script execute or no execute

o hola.. Tengo un script que se ejecuta bajo una tarea del CronJOb del unix, tengo la version 11 de unix, mi script tiene un ciclo que lee unos archivos .txt luego cada uno de esos archivos debe pasar por un procedimiento almacenado el cual lo tengo almacenado en mi base de datos oracle 10g,... (4 Replies)
Discussion started by: Kespinoza97
4 Replies
Login or Register to Ask a Question