Article 4XEKQ Run script as a different user from root

Run script as a different user from root

by
B612
from LinuxQuestions.org on (#4XEKQ)
Hello

I have a script that erase files from different folders, and because of this I'd like to limit the risk in running this script from a limited user.
The problem is that script need to mount folders and for this I need to run it as root.

I've tried to call from the root's script a second script as different user, but it runs with root rights.

What is right way to deal with this ?
- one script for mounting as root, and another from different user for erasing ? (with 2 crontabs)

Thankslatest?d=yIl2AUoC8zA latest?i=wWxA8VQAPFA:I6PDJENXalA:F7zBnMy latest?i=wWxA8VQAPFA:I6PDJENXalA:V_sGLiP latest?d=qj6IDK7rITs latest?i=wWxA8VQAPFA:I6PDJENXalA:gIN9vFwwWxA8VQAPFA
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments