> 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.

-- 


NOTICE: This message, including any attachments, is only for the use of the 
intended recipient(s) and may contain confidential and privileged information, 
or information otherwise protected from disclosure by law.  If the reader of 
this message is not the intended recipient, you are hereby notified that any 
use, disclosure, copying, dissemination or distribution of this message or any 
of its attachments is strictly prohibited.  If you received this message in 
error, please contact the sender immediately by reply email and destroy this 
message, including all attachments, and any copies thereof. 

Reply via email to