in reply to Re^2: I need a user just for Perl script run from web browsers
in thread I need a user just for Perl script run from web browsers

In the general case it is arguably a bad idea. However, in bartender1382's specific situation of wanting a user to own the apache processes it is fine, IMHO. Both users should never login and so should have /bin/false or similar as their login shell anyway. They can also happily share the same home dir.

Note that bartender1382 has given no background as to why on earth they want to do this in the first place. It does seem like making work for no good reason when there is a perfectly valid single-use user already dedicated to apache in pretty much every O/S. It sounds very much like an XY problem to me.


🦛

Replies are listed 'Best First'.
Re^4: I need a user just for Perl script run from web browsers
by Bod (Parson) on May 01, 2022 at 20:01 UTC
    specific situation of wanting a user to own the apache processes it is fine, IMHO

    It might be fine from an admin point of view. However, from what haj has said, it doesn't seem to solve the OP's problem.

    I just did the experiment for the relevant portion (the output of top and ps, and indeed, the login name is not preserved

    The OP wants the username to appear in top so they can differentiate between their admin account and a user running the Perl script. At least, I think that's what they want to do.

    I recall a long time ago being introduced to nobody that was a *nix user account for running Perl scripts on a webserver. I didn't understand it at the time I don't remember enough details to try and piece it together now but it might jog the memory of some experts in *nix is it is a possible solution.

Re^4: I need a user just for Perl script run from web browsers
by bartender1382 (Beadle) on May 01, 2022 at 17:58 UTC

    Note that bartender1382 has given no background as to why on earth they want to do this in the first place. It does seem like making work for no good reason when there is a perfectly valid single-use user already dedicated to apache in pretty much every O/S. It sounds very much like an XY problem to me.

    Actually I did, I want a dedicated user to run all the perl scripts, so when I use the top command (debugging forks, etc.) it is easier of me to single outage processes for just that user.

    Not sure who the "perfectly valid single-use user" that's already in existence.

    Again, I am Johnny1 who setup the server, created paths, edited .htaccesses, installed all, etc. etc. But my knowledge in linux in limited to just that, setup. So if I could created that user, to place in the enviers file, it would just make my daily work easier.