dgajewsky
4th January 2002, 17:55
Is there a UNIX (Command line) utility to change the baan users database passwords? I would like to change the users passwords via a script instead of changing each and every one of them. I am looking specifically for a command line utility to change the "DATABASE" password and not the users login password... Any help would be greatly appreciated...
Thanks in advance for all your help...
Dan Gajewsky
Sr. Database Administrator
Philips Medical Systems
patvdv
4th January 2002, 18:03
Hi Daniel,
Baan provides a cmd utility called $BSE/bin/ora<x>_maint<y> where <x> is your Oracle version and <y> your Baan Tools version. In most cases this would be ora8_maint6.1.
Run ora8_maint6.1 -? to get a list of parameters and options.
The way to change the DB passwords of your users in bulk would be to build a script that does the following in sequence:
[LIST=1] change the password using SQL*plus
run the ora8_maint6.1 tool to update the $BSE/lib/ora/ora_users file in order to change the encrypted password so that it matches the new DB password again.[/list=1]
Hope this helps :)
dgajewsky
4th January 2002, 18:32
When I type in the command ora8_maint6.2 I get the following. Where can I find out what the options are?
???? -1 -1 No option a, A, d, D, r, R, h or U specified
dgajewsky
4th January 2002, 18:34
Please disregard the previous message. I used the /? option not the -? option. I now have a listing. THANK YOU VERY MUCH!
patvdv
4th January 2002, 18:46
Hi Daniel,
The full syntax is:
root# [/opt/baan5/bse/bin] # ./ora8_maint6.2 -?
Add an user.
[ -n ] -a Baan user -m Oracle user -p User password -G group { -P Group Password | -F -c OracleDBA -i OracleDBApassword }
Change Oracle user password.
[ -n ] -r Baan user -m Oracle user -p New password { -F { -o current password | -c OracleDBA -i OracleDBApassword } }
Drop an user.
[ -n ] -d Baan user -G Group { -P Group Password | -F -c OracleDBA -i OracleDBApassword }
Add a group.
[ -n ] -A group -P Group Password { -F -c OracleDBA -i OracleDBApassword }
Change group password.
[ -n ] -R group -P Group Password { -F { -o Current Group Password | -c OracleDBA -i OracleDBApassword } }
Drop a group.
[ -n ] -D group { -P Group password | -F -c OracleDBA -i OracleDBApassword }
Check password.
-h -m Oracle user -p password
Batch mode.
-b batchfile
Redirect errors to errorfile.
-q errorfile
Command line passwords encrypted / Batch file password not encrypted.
-Q
Print usage.
-U/?
To change the password of 1 user you would do something like:
root# [/opt/baan5/bse/bin] # sqlplus
SQL*Plus: Release 8.0.6.0.0 - Production on Fri Jan 4 17:36:31 2002
(c) Copyright 1999 Oracle Corporation. All rights reserved.
Enter user-name: system
Enter password:
Connected to:
Oracle8 Enterprise Edition Release 8.0.6.0.0 - Production
With the Partitioning and Objects options
PL/SQL Release 8.0.6.0.0 - Production
SQL> alter user dummy identified by dummy;
User altered.
SQL> exit
Disconnected from Oracle8 Enterprise Edition Release 8.0.6.0.0 - Production
With the Partitioning and Objects options
PL/SQL Release 8.0.6.0.0 - Production
root# [/opt/baan5/bse/bin] # ./ora8_maint6.2 -r dummy -m dummy -p dummy -c system -i <system_password>
dummy 0 0 Oracle password for user 'dummy' changed
dgajewsky
4th January 2002, 18:56
I change the password in oracle then the password with this utility. Use this utility to verify that the password is changed and get success. But it does not update the ora_users file, thus it never really changes the password for the user and I get an error when I log into baan. If I change the users password in oracle (SQL*Plus) back to the original it works fine...
patvdv
4th January 2002, 19:24
Hi Daniel,
It works for me. The ora8_maint6.2 does change the encrypted password each time you run it with the 'rename' option. This you can verify yourself in the $BSE/lib/ora/ora_users file. Possibly you are using a porting set that behaves differently? The test I did works on 6.2a.03.01. Check if the string with encrypted characters changes in the ora_users file after you run the tool.
What kind of errors are you getting when logging in? Check any entries in your $BSE/log/* log files and let us know.
dgajewsky
4th January 2002, 20:08
My environment variables were not set correctly. It is now working! THANK YOU!!!