If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > User account

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-26-04, 08:39
lasgaa lasgaa is offline
Registered User
 
Join Date: Apr 2004
Posts: 12
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
Reply With Quote
  #2 (permalink)  
Old 07-26-04, 09:19
gurey gurey is offline
Registered User
 
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.
Reply With Quote
  #3 (permalink)  
Old 07-26-04, 10:21
lasgaa lasgaa is offline
Registered User
 
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 ??
Reply With Quote
  #4 (permalink)  
Old 07-26-04, 15:58
artemka artemka is offline
Registered User
 
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
Reply With Quote
  #5 (permalink)  
Old 07-26-04, 17:29
bull_abraham bull_abraham is offline
Registered User
 
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On