Unix script security

By mevreugd
Jul 7, 2007
  1. I'm using an excellent script from R. H. Reepe for accessing accounts, but need a security line, that fits the script. Any suggestions? Thx in advance;)
    Her's the script

    Arg_1 = Requested Account Name (coded string)
    # Arg_2 = Calling Script Name ($0)
    # Arg_3 = [Calling PID (for uniqueness)]

    if [ "$1" = "" ]
    echo "Error in $0 : No coded string provided"
    echo "Oracle Connection Refused"
    exit 1
    if [ "$2" = "" ]
    echo "Error in `s_prog` : No calling script_name provided for"
    echo "Subroutine s_access_account - Oracle Connection Refused"
    echo "Attempt to Crack Security made by $USER at `date`" >> $_audit_log
    echo "From terminal $TERM (`tty`) using script `s_prog`" >> $_audit_log
    exit 2
    _script_type=`dirname $2`
    _script_type=`basename $_script_type`
    _script_name=`basename $2`
    if [ "$_script_type" = "." ]
    _script_type=`basename $_script_type`
    account=`/usr/5bin/echo "$1\c" | $DECODE`
    /usr/5bin/echo "export account" > $account_string"$_pid"
    /usr/5bin/echo "account=$account\c" >> $account_string"$_pid"
    . $account_string"$_pid"
    _name=`echo "$account" | tr '/' ' ' | cut -f1-1 -d\ `
    echo "$_timestamp Oracle connecting as $_name from $_script_type $_script_name" >>
    s_delete_account $_pid & > /dev/null 2>&1
    return 0
  2. jobeard

    jobeard TS Ambassador Posts: 11,122   +982

    what do you mean by 'security line'? Do you wish to verify that only authorized users
    may invoke(run) the script?

    the Oracle login will succeed or fail normally so what's your concern?

    btw, there are other means to access Oracle, so this usage is marginal anyway.
Topic Status:
Not open for further replies.

Similar Topics

Add your comment to this article

You need to be a member to leave a comment. Join thousands of tech enthusiasts and participate.
TechSpot Account You may also...