On 04/30/2014 10:55 AM, Bluejay Adametz wrote:
It seems to me that having a shell script prompt for the root password is a
recipe for disaster, but you can easily check to see if the user is already
root, and bail if not.

I've been uneasy with that idea as well, although not to the point of
imminent disaster ...

Different sites might have different rules for gaining root access.
Some might not even permit su and require everything to go through
sudo, or some other mechanism, perhaps as part of an auditing/logging
process.

If it needs to run as root, I would just state that as a requirement,
check for that condition, and output a clear error message if it's not
met. Sometimes it's possible to "dumb things down" too much.

                                                          - Bluejay Adametz

Matter may be created or destroyed, but it
may not be returned without a receipt.


Hi Bluejay,

No root, no shirt, no shoes, no service is the
way I wrote it.  Maybe not the shirt or shoes.

:-)

-T


--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Computers are like air conditioners.
They malfunction when you open windows
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Reply via email to