Results 1 to 5 of 5

Thread: User account

  1. #1
    Join Date
    Apr 2004
    Posts
    12

    Unanswered: User account

    Hi all,

    I created a new unix user and i want to give to that user just select commands in dbaccess.

    please how can i proceed ??

    Thank you

  2. #2
    Join Date
    Aug 2003
    Location
    Argentina
    Posts
    780
    Hi,

    Please define on environment user, the following variables:
    INFORMIXSERVER= on-line name server
    INFORMIXDIR= path software of Informix installation
    ONCONFIG= on-line configuration file
    Add PATH=$INFORMIXDIR/bin:$PATH

    Gustavo.

  3. #3
    Join Date
    Apr 2004
    Posts
    12
    Hi Gustavo,

    Thanks for your message. I defined environment variables, but the problem is that the user can make select, drop...queries !

    I want to give that user JUST SELECT privilege !

    Have you an idea ??

  4. #4
    Join Date
    May 2004
    Location
    New York
    Posts
    248
    log in as dbadmin and grant select privelege on the tables that you want user to access

    Cheers

  5. #5
    Join Date
    Feb 2004
    Posts
    32
    The following script will generate the file that you would then run at the command line......
    $>dbaccess <database> grant.sql
    SCRIPT STARTS HERE.......

    #!/bin/ksh


    if [ $# -lt 3 ]
    then
    echo "Usage : permissions <select|insert|update|delete|all> <username> <database_name> "
    exit
    else
    > grant.sql
    for i in $3
    do
    #echo "select 'grant $1 on '||tabname[1,18]||' to $2 as '||owner[1,8]||';' from systables where tabid > 99 and tabtype = 'T' " |dbaccess $3 |sed -e 1,4d>
    > grant.sql
    echo "select 'grant $1 on '||tabname[1,18]||' to $2 as '||owner[1,8]||';' from systables where tabid > 99 " |dbaccess $3 |sed -e 1,4d>> grant.sql
    done
    fi

    END OF SCRIPT.

    You need to run this script as user "informix".

    -Abraham

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •