Senin, 14 Januari 2008

Create another user like informix user (Linux)

We usually access informix database using informix user
The question is, how we access the database using another user?
Can we access the database with another user?
FYI, You can access the database although you use 'root'
You can access it with other user but you have to create that user
The following below is tutorial how create that user:

Let's say we create user 'wahyu':
# useradd -g informix wahyu

Don't forget to give the password:
# passwd wahyu

Login with new user:
# su - wahyu

Add script on .bash_profile
$ vi .bash_profile

#---Add this script----#
# ex: INFORMIXDIR at /opt/informix
export INFORMIXDIR=/opt/informix
export PATH=$PATH:/opt/informix/bin
export INFORMIXSERVER=wahyudb
bexport TERM=vt100

Login as informix:
$ su – Informix
Run dbaccess:$ dbacessClick Query-Language > "your database name",
then run this:
grant dba to wahyu

Wow... U already give 'wahyu' with dba access... be carreful !!!

It's very easy, is not it ?

Tidak ada komentar: