If the DB connection parameters (account/password) accessible to USERA involve permissions that should not be shared among the other users, the thing to do is to create a separate DB user account for the database / tables / columns in question, tailor the permissions for this new account to be appropriate for those other users (e.g. "select" only, or "select" and "update", or whatever), and provide a config file that they can access to use the connection parameters for this restricted DB account.

From what you've described, it sounds like a database access issue, not a login user account issue, so it should be solved via the database connection accounts with suitable granting of access within the DB, not by a shell-level setuid.

The point is that database user accounts and permissions are separate from shell / login accounts and permissions; a DBA manages the former, and a sysadmin manages the latter.


In reply to Re: Running Perl Script As a Different User by graff
in thread Running Perl Script As a Different User by walkingthecow

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.