Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

pleasssee help oracle uasename+pass

Status
Not open for further replies.

nomanoma

Programmer
Apr 6, 2006
24
BA
Hello friends...

I am having old machine with oracle 8 on it
oracle is running on solaris /home/oracle/8.1.6

I do not know user name and password...is there a way to change user /pass or find out what was username /password

I have root privelage on my solaris..

is there a way to recover out my U+P
 
Nomanoma,

I'm glad that you confirmed that you have root privileges for your environment, because going in "the back door" requires elevated privileges.

I'll focus on how to accomplish your objective from the Solaris perspective:
[tt]
1) Confirm the existing Unix group that Oracle recognises as the DBA-privileged group name:

a) cd $ORACLE_HOME/rdbms/lib/
b) cat config.s
i) observe the lines at/near the end of that file that contain the designators, ".ascii"; the group name that follows immediately that designator is the name of the Oracle-DBA-privileged Unix group.

2) Connect to the subject machine as a Unix user that is a member of the Oracle-DBA-privileged Unix group.

3) Confirm that the environment-variable settings are correct for these variables:
a) ORACLE_HOME -- the fully qualified path to the directory tree that contains your Oracle installation...probably "/home/oracle/8.1.6"
b) ORACLE_SID -- contains the "name" of the Oracle database instance to which you are trying to connect.

4) Connect, as a DBA to the Oracle instance:
a) Run Oracle's SQL*Plus program as a DBA:
i) % sqlplus /nolog
ii) SQL> connect / as sysdba
iii) alter user <username> identified by <new password>;[/tt]

Let us know if this resolves your need.

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
[I provide low-cost, remote Database Administration services: www.dasages.com]
 
noma,

If you have root privilege on the server, then add an account to the Solaris equivalent of the windows ORA_DBA group. I believe that the group is named something similar.

Then you can log into the oracle database as sys, with any password, as sysdba.

Because your account is in the oracle dba group, it should automatically authenticate without a valid password.

Regards

Tharg

Grinding away at things Oracular
 
well..as U can see I have no experience in DB..I worked only with mySQL ..but comparing it with oracle mysql is very simple..
when I do cat config.s I get this:

>cat config.s

.section ".text",#alloc,#execinstr
/* 0x0000 7 */ .file "x.c"

.section ".data",#alloc,#write
/* 0x0000 9 */ .global ss_dba_grp
/* 0x0000 10 */ .align 4

.global ss_dba_grp
ss_dba_grp:
/* 0x0000 17 */ .align 4
/* 0x0000 18 */ .word (.L12+0)
/* 0x0004 24 */ .align 4
/* 0x0004 25 */ .word (.L13+0)
/* 0x0008 26 */ .type ss_dba_grp,#object
/* 0x0008 27 */ .size ss_dba_grp,8

.section ".rodata1",#alloc
/* 0x0008 13 */ .align 4


.L12:
/* 0x0008 15 */ .ascii "dba\0"
/* 0x0014 20 */ .align 4


.L13:
/* 0x0014 22 */ .ascii "dba\0"


root@x1OnGoing:/home/oracle/8.1.6/rdbms/lib

and I do not know where to go next..and now if I do from my folder:
root@x1OnGoing:/home/oracle/8.1.6/bin
>sqlplus
Message file sp1<lang>.msb not found
Error 6 initializing SQL*Plus

please help me with more istructions..
Thanks in advance
 
nomanoma,

the msb files are language resource files, i.e. they configure applications so that they provide their descriptive text in the users chosen language.

I had a similar problem with SQL Loader, where it was missing the ulus.msb file. I called oracle support and they showed me how to install it. I suggest that you raise a TAR on metalink.

Alternatively, you could find a source of the msb files and copy the missing ones to your local disk (which I where I presume you're attempting to run SQL plus).

Once you have SQL plus fixed, you could start again on your original problem.

Regards

Tharg

Grinding away at things Oracular
 
But still..I can not connect to database..
 
nomanoma,

If sql plus is working correctly, and you have acted on SantaMufasa's instructions, then you can connect using the
Code:
 slqplus /nolog
method outlined above.

Fix sql plus, (or use someone else's machine which has working sql plus) and then tackle the db problem.

Regards

Tharg

Grinding away at things Oracular
 
Nomanoma,

I think your problem is because you tried as root. This usually won't work.
As SantaMufasa suggested, try as Oracle user.

hope this helps.
 
OK maybe it is not working as root..I can see in my /etc/passwd that there is oracle user

su -oracle

I have been asked for oracle password..I do not know that password..

thanks
 
Not sure about Solaris, but if you run su - oracle as root, (mind the blank between - oracle, by the way!), then Unix shouldn't ask for a password. Correct me if I am wrong!
And alternate way: As root, you may change oracle's password.
 
That's my understanding too, hoinz. It is possibly an issue with the -oracle as you mentioned.

Alan Bennett said:
I don't mind people who aren't what they seem. I just wish they'd make their mind up.
 
U said As root, you may change oracle's password.

how could I do that??

if I do


>passwd -s oracle

I got this:
Permission denied
 
mmm..., strange...
It seems we are getting into Unix/Solaris problems now.

Please try again, and make sure that you are really trying as root.
For verfication, you may use commands like 'who am i' or 'id'

And please could you show the whole lines for root and oracle from /etc/passwd?
Did you change anything regarding root or oracle?
 
no I change nothing...

>cat /etc/passwd
root:x:0:1:Super-User:/:/usr/bin/ksh
daemon:x:1:1::/:
bin:x:2:2::/usr/bin:
sys:x:3:3::/:
adm:x:4:4:Admin:/var/adm:
lp:x:71:8:Line Printer Admin:/usr/spool/lp:
smtp:x:0:0:Mail Daemon User:/:
uucp:x:5:5:uucp Admin:/usr/lib/uucp:
nuucp:x:9:9:uucp Admin:/var/spool/uucppublic:/usr/lib/uucp/uucico
listen:x:37:4:Network Admin:/usr/net/nls:
nobody:x:60001:60001:Nobody:/:
noaccess:x:60002:60002:No Access User:/:
nobody4:x:65534:65534:SunOS 4.x Nobody:/:
oracle:x:100:100:Oracle User:/home/oracle:/usr/bin/ksh


and I changed nothing regarding root and oracle..
 
It seems your Solaris machine used to store passwords in some external repository; to verify:
What is the entry for passwd in /etc/nsswitch.conf ?
 
here is it

>cat /etc/nsswitch.conf
#
# /etc/nsswitch.files:
#
# An example file that could be copied over to /etc/nsswitch.conf; it
# does not use any naming service.
#
# "hosts:" and "services:" in this file are used only if the
# /etc/netconfig file has a "-" for nametoaddr_libs of "inet" transports.

passwd: files
group: files
hosts: files
networks: files
protocols: files
rpc: files
ethers: files
netmasks: files
bootparams: files
publickey: files
# At present there isn't a 'files' backend for netgroup; the system will
# figure it out pretty quickly, and won't use netgroups at all.
netgroup: files
automount: files
aliases: files
services: files
sendmailvars: files



please can anyone help me how to recover oracle DB..

Best regards,
 
Hi,
you might want to ask in a Solaris forum ...

But let me try once again:
What is the output of these commands:
ls -l /etc/shadow
ls -l /etc/passwd
ls -l /usr/bin/passwd

regards
 
ok here it is>
>ls -l /etc/shadow
-r-------- 1 root sys 608 Jan 9 11:39 /etc/shadow

>ls -l /etc/passwd
-r--r--r-- 1 root sys 1210 Nov 23 13:48 /etc/passwd

>ls -l /usr/bin/passwd
-r-sr-sr-x 3 root sys 96416 Feb 4 2000 /usr/bin/passwd


Also somehow I managed from some script find username and pass..

and when I did>
root@x1OnGoing:/home/oracle/8.1.6/bin
>sqlplus
Message file sp1<lang>.msb not found
Error 6 initializing SQL*Plus

then I

root@x1OnGoing:/home/oracle/8.1.6/bin
>export ORACLE_SID=cx6
root@x1OnGoing:/home/oracle/8.1.6/bin
>export ORACLE_BASE=/home
root@x1OnGoing:/home/oracle/8.1.6/bin
>export ORACLE_HOME=$ORACLE_BASE/oracle/8.1.6
root@x1OnGoing:/home/oracle/8.1.6/bin
>sqlplus

SQL*Plus: Release 8.1.6.0.0 - Production on Tue Jan 9 11:41:09 2007

(c) Copyright 1999 Oracle Corporation. All rights reserved.

Enter user-name: cx
Enter password:

Connected to:
Oracle8i Enterprise Edition Release 8.1.6.2.0 - Production
With the Partitioning option
JServer Release 8.1.6.2.0 - Production

SQL>
SQL>

I entered in sql prompt..but am I admin oracle user or what are my privilages..I can not figure...what is my next step..
thanks
 
Well done, Nomanoma.

So you overcame part of your problems.
But most probably you are not administrator.
Becoming administrator would be easy if you could log on to Unix as a member of dba group, like SantaMufasa stated above. And that's why I tried to find a way to reset oracle's password.

But for now, you may check your privileges in SQL*plus by:
select granted_role from user_role_privs;

And perhaps there are more scripts containing passwords?
The password of user 'system' would help much.
 
no...no more other scripts..:(

here is output of select granted_role from user_role_privs;


SQL> select granted_role from user_role_privs;

GRANTED_ROLE
------------------------------
CONNECT

SQL>

I can tell it is very bad..not much privilages..
Also as I mention I connect to unix as root..but problem is oracle..:(
what do U suggest?

thank U very much.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top