Run program as another user

Run program as another user

Post by cm » Fri, 14 Feb 2003 02:52:11



Hello

My question is: how do I tell a program to run as another user? Most of the server-apps allow me to set the user/group they run under in their config-file. But some do not. So when I start them while booting the system, they normally run with root-privilegs. how can I tell them 'by hand' to run as an unprivileged user?

Chris

 
 
 

Run program as another user

Post by Arcadius A » Fri, 14 Feb 2003 03:18:32



Quote:> Hello

> My question is: how do I tell a program to run as another user? Most of

the server-apps allow me to set the user/group they run under in their
config-file. But some do not. So when I start them while booting the system,
they normally run with root-privilegs. how can I tell them 'by hand' to run
as an unprivileged user?

Try

su  theUserName -c  yourProgramName

(or man su )
Arcadius.

 
 
 

Run program as another user

Post by 41 » Sat, 15 Feb 2003 02:21:30



> Hello

> My question is: how do I tell a program to run as another user? Most of
> the server-apps allow me to set the user/group they run under in their
> config-file. But some do not. So when I start them while booting the
> system, they normally run with root-privilegs. how can I tell them 'by
> hand' to run as an unprivileged user?

> Chris

sudo, in the ports tree, will also give you the ability to run a program as
another user. The nice thing is you don't have to give out the root (or
user) password to people who need to run something.

Keep in mind, that if the program you want to run as a non-root user needs
to bind to an unprivledged port (below 1024) it needs root authority to do
so.

 
 
 

1. run a non-root user's program from a non-root user

Hi Folks,

Here is the problem.

I have user A and user B (non-root users)

I need for user A to initiate a job as user B. How can this be done?

As you know, I can do this as root. I can start a process from root as
another user in the system (cron jobs come to my mind!) Is there a way
to do this for non-root users? I believe I need to be able to do
something like  as user A
"su - B" without being prompted for password.

Appreciate suggestions in advance.

Pasha

BTW: I am using AIX 4.3.10

2. Printing to HP Deskjet520

3. How to : Program still running after user logout

4. Cable Internet Anyone?

5. Getting login id of user running a program

6. question on smf(5) dependency

7. non-root user can't run certain programs

8. wierd Cron hack attacked

9. Running Program As Another User

10. problem on running a daemon program by other user

11. Run program as another user

12. How to let normal users run SVGALIB programs (SOLN)

13. I can't run programs as ROOT, but ok as other users!