Solved

processs started by root but running as somebody else

Posted on 1998-07-13
1
232 Views
Last Modified: 2010-04-20
How do you get a program to run under a different uid than the user that
started the program?

For example:  httpd on my computer is owned by root ; however, it
shows up in the process table as running under user "nobody".

I want to start a program during boot time and have it show up in the
process table with a user's uid instead of root's.
0
Comment
Question by:mag062397
1 Comment
 
LVL 2

Accepted Solution

by:
mlev earned 50 total points
ID: 1637531
If you want to start an existing program under another user, you can do that with "su <user> -c <program>"
If you do "su - <user> -c <program>", it will also get the user's default environment, run in their home dir etc.

If you are writing a program of your own that you'd like to change uid, it can be achieved with the setuid system call.
0

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now