start a program with other user's permission


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting start a program with other user's permission
# 1  
Old 05-19-2007
start a program with other user's permission

I have some of programs in unix system which are to started with one_user say "xxxx".

I have sudo permission if i start these programs with sudo it shows root permission. But i want these programs permession should be "xxxx".


I tried "su user_name -c Program_name"

but it is not working..

pls help
# 2  
Old 05-19-2007
You can use ssh to solve this problem.

Set up $HOME/.ssh/authorized_key entries for the users who need to be impersonated and then run the command using ssh and the matching private key.
# 3  
Old 05-19-2007
Quote:
Originally Posted by srikanthus2002
I have some of programs in unix system which are to started with one_user say "xxxx".

I have sudo permission if i start these programs with sudo it shows root permission. But i want these programs permession should be "xxxx".


I tried "su user_name -c Program_name"

but it is not working..

pls help
could you please post the reason it is not working? that is the proper syntax - i created a script that touches a file, ran it as root and the file is owned by the user i set it to run as
# 4  
Old 05-21-2007
when I run the script all application relates services are started but with root permissions.

ps -elf | grep application_service executed

it shows root instead of users_permission.

help me out if it is possible in shell script or perl...
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Start program depending on processor workload

Hi community, I'm looking for a script/code which starts a shell script with a MPI process depending on: a) the processor workload, i.e. if the workload falls below a certain limit b) alternatively if the previous process finished, e.g. if a process ID disappears I need this for... (3 Replies)
Discussion started by: heunigreenfreak
3 Replies

2. Fedora

[Solved] Unable to start Matlab program

hello everyone, I have Matlab installed on Fedora 16. I tried running it by simply typing on terminal: $ matlabBut it returned the follwoing error: --- can anyone suggest a solution? cheers, peter ---------- Post updated at 10:57 PM ---------- Previous update was at 10:54 PM ----------... (1 Reply)
Discussion started by: peter_071
1 Replies

3. OS X (Apple)

A program crashed my iMac so bad that it could not start up.

Hi, Solid as a rock or ... Is it possible for a program to damage an iMac (Snow Leopard) so bad that it cannot start up again, and need to be repaired? I am asking about this, because this seems to have occurred two days ago, when I was running a popular game program. When I closed the... (6 Replies)
Discussion started by: ASL123
6 Replies

4. Homework & Coursework Questions

little start c program

hello, i wil make the next mission: give how many chambers in a constant number. use an array which chamber is free and count how many chamber there are free. make also something to test I don't now how to start. I need an little example so i can make the mission thank you (10 Replies)
Discussion started by: wouter88
10 Replies

5. UNIX for Dummies Questions & Answers

Unable to run program, Permission denied

Hi All, I am working on Solaris Sparc 9 and I developed application and in that I want to open any file when any action is happened but when I am trying to do the same.I am getting the error -- "Error launching /test.txt", "", "Process.execAndWait", "java.io.IOException: Cannot run... (0 Replies)
Discussion started by: smartgupta
0 Replies

6. Shell Programming and Scripting

Start program in background (or start crontab ahead of time)

Hey! I'm working on a script that will add a user, create some configfiles, and add a crontab for the user. The crontab looks like the following: @reboot /home/user/program config.conf & I would like for this process to start at the end of my script under the corresponding username by... (0 Replies)
Discussion started by: noratx
0 Replies

7. Programming

How to start a process in linux using C program??

I have a set of attributes such as group id,group name,etc related to a linux process. Iwant to know how to start a process in linux using C program.Plz do help me. (3 Replies)
Discussion started by: vigneshinbox
3 Replies

8. Programming

how I know owner of file and its permission through c program

Helo I havea particular file. how I know ownerof the file as well as file permission using c program. Regards, Amit (4 Replies)
Discussion started by: amitpansuria
4 Replies

9. UNIX for Dummies Questions & Answers

Program permission (to install etc)

hi! all i've setup my PC with FreeBSD 6.2 and i've created login ID for my friends i would like to allow them to install program (since they're requesting to use bnc/psybnc) using their shell however, they have encounter such error to install the program they have to sudo in order to run... (3 Replies)
Discussion started by: rdns
3 Replies

10. UNIX for Dummies Questions & Answers

How do I start a program when I start my Computer?

I'm running MAC OS X and I'm wondering how I start 'nixey programs (not normal apps) on startup? Things like the dnet client and hxd Hotline Server. Anyone know? (1 Reply)
Discussion started by: l008com
1 Replies
Login or Register to Ask a Question