Computing.Net > Forums > Solaris > Problem with non root user

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Problem with non root user

Reply to Message Icon

Name: Stefan
Date: January 22, 2003 at 02:04:49 Pacific
OS: Solaris 8
CPU/Ram: Ultra 5
Comment:

Hello!
This is the problem:
I have a process that runs as non root but after I reboot the computer the process restarts as root. I have changed the owner of my startscripts in init.d directory from root to my user but it didn't help.
It is probably some simple thing I have to do but I'm lost here. Please give me a hint :-)




Sponsored Link
Ads by Google

Response Number 1
Name: jmiturbe
Date: January 22, 2003 at 02:14:06 Pacific
Reply:

Hello,

The first thing is to tell you that the ownership of one file does not fix the user that the process asociated to this file runs as (for example, change the mode of any binary file to 777 and execute it with any user diferent from the owner and see what it happens).

I think that the startup scripts are always run as root (but Iīm not sure) so you could modify the starting script to include an su to the desired user (the command is: "su - desired_user") before the line that runs the process. To test this without shuting down, run the startup script as root and see if the final process is run as the user you want.

Bye,

Joseba M. Iturbe


0

Response Number 2
Name: Stefan
Date: January 22, 2003 at 07:34:28 Pacific
Reply:

Thanks Joseba for your quick answer.
One problem though.
I get the message "No Directory!"
when I use the su command. Does this mean that I have not specified the home directory for that particular user and does the su command fail in that case?

regards Stefan


0

Response Number 3
Name: jmiturbe
Date: January 24, 2003 at 01:34:27 Pacific
Reply:

Hello again,

Seems like this user does not have a home directory or itīs wrong specified at /etc/passwd. But, does the su command fail? Iīm not sure but I think that it works even if the directory is not present (you can see who runs the process with ps -efa).

I think that you can avoid the creation and the use of this home using the su command without the colon, that is, su desired_user instead of su - desired_user. This way you tell the OS to switch the user but using the environment of the user that is issuing the su command (in this case root).

Test it and see if it mets your needs. If not, create the userīs home and use su -.

Bye,

jmiturbe


0

Response Number 4
Name: Stefan
Date: January 24, 2003 at 01:58:50 Pacific
Reply:

Thank you all for your help, I got it to work now.
Bye :-)


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


timestamp formatting script for date search



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Solaris Forum Home


Sponsored links

Ads by Google


Results for: Problem with non root user

Non root user processes dies www.computing.net/answers/solaris/non-root-user-processes-dies/3214.html

how to use port 80 as non root user www.computing.net/answers/solaris/how-to-use-port-80-as-non-root-user/4414.html

how to use port 80 as non root user www.computing.net/answers/solaris/how-to-use-port-80-as-non-root-user/2305.html