Skip to content

ASMSNMP user in ASM 11g (user creation/password change)

We generally receive few errors related to asmsnmp user while using ASM. Few of them are :

Could not validate ASMSNMP password due to following error- “ORA-01031: insufficient privileges”
ORA-01990: error opening password file ‘/u02/app/11.2.0/grid/dbs/orapw’
ORA-15306: ASM password file update failed on at least one node
ORA-01918: user ‘ASMSNMP’ does not exist

Mostly the reason is missing asmsnmp user or missing password file in ASM instances.

 

1. How to create asmsnmp user
——————————————-

First Check which all users are present for ASM >>

SQL> select * from v$pwfile_users;

no rows selected

OR

ASMCMD> lspwusr

Username sysdba sysoper sysasm

This shows no user are present

 

A) Create a password file if not already present

$orapwd file=/u01/app/11.2.0/grid/dbs/orapw+ASM password=<sys_password>

++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Remember below important point about password file in ASM

If there are two nodes with +ASM1 running on node 1 and +ASM2 running on node2.

— Pre 11gR2 —
Password file on Node1: orapw+ASM1
Password file on Node2: orapw+ASM2
— 11gR2 —
Password file on Node1: orapw+ASM
Password file on Node2: orapw+ASM

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

 

B) Copy the password file to other nodes

$ scp orapw+ASM <Node2>:/u01/app/11.2.0/grid/dbs/

copy the password files to other nodes if you have more than 2 nodes in the RAC.

 

C) create user and give sysdba privileges

SQL>create user asmsnmp identified by <make_asmsnmp_password>;

SQL> grant sysdba to asmsnmp;

 

Check again for users in ASM  >>

SQL> select * from v$pwfile_users;

USERNAME              SYSDB                SYSOP             SYSAS
——————————————————————————————————————— —– —– —————————————————————————————————————–
SYS                    TRUE                TRUE                 TRUE
ASMSNMP                TRUE                FALSE                FALSE

 

SQL> show parameter pass

NAME                                   TYPE                            VALUE
———————————— —————————————————————————————– ——————————————————————————————————
remote_login_passwordfile             string                          EXCLUSIVE

 

The ASM instance parameter “REMOTE_LOGIN_PASSWORDFILE” has to be set to EXCLUSIVE or you will get an ORA-01999 error.

Also you can check  user detials from asmcmd

ASMCMD> lspwusr
Username        sysdba         sysoper       sysasm

SYS             TRUE           TRUE          FALSE
ASMSNMP         TRUE           FALSE         FALSE

 

How to Change password for ASMSNMP
——————————————————–

ASMCMD> lspwusr

Username  sysdba sysoper sysasm
SYS       TRUE   TRUE     TRUE
ASMSNMP   TRUE   FALSE    FALSE

ASMCMD> orapwusr -modify -password ASMSNMP

Enter password: *******
(give new password and press enter)

orapwusr attempts to update passwords on all nodes in a cluster. The command requires the SYSASM privilege to run. A user logged in as SYSDBA cannot change its password using this command.

 

Test new asmsnmp password >>

————————–

$ sqlplus asmsnmp/asmsnmp as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Wed Feb 6 12:57:30 2013

Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 – 64bit Production
With the Real Application Clusters and Automatic Storage Management options

 

Brijesh Gogia

4 Comments

  1. Nico Nico

    You can create the asmsnmp user and password (or change the password with one command):

    asmca -silent -postConfigureASM -oui_internal -sysAsmPassword “sys_password” -asmMonitorPassword “asmsnmp_password”

  2. jay jay

    using sqlplus asmsnmp/asmsnmp as sysdba to test the password won’t tell you if it worked because of the orapw file. even if you enter the password wrong, the system will still log you in because of os authentication. the only way to test if the password change worked is to test from an external computer.

    • Brijesh Gogia Brijesh Gogia

      Jay- Completely agree with your comment.

      • Nice Article Nice Article

        how to do the test from external Computer ?

Leave a Reply