Manage ASM Password file with ASMCMD commands in Oracle
Create a Password file in ASM
ASMCMD> pwcreate –dbuniquename {db_unique_name} {file_path} {sys_password}
Example:
ASMCMD> pwcreate --asm +disk_group_name/orapwASM sys_password
ASMCMD> pwcreate –-asm '+DATA/orapwasm' 'welcome'
Check the password file location
pwget --asm
+disk_group_name/orapwasm
List the ASM user password
ASMCMD> lspwusr
Username sysdba sysoper sysasm
SYS TRUE TRUE TRUE
ASMSNMP TRUE FALSE FALSE
Modify user password
ASMCMD> orapwusr --modify asmsnmp
Enter password: ********
Change ASM sys password
ASMCMD> orapwusr --modify --password sys
Enter password: ******
Add or delete user to the existing password file
--for add
ASMCMD> orapwusr --add hruser
--for delete
ASMCMD> orapwusr --delete hruser
Backup the Password
ASMCMD> pwcopy --asm +DATA/orapwasm +FRA/orapwasm_new
Set the location of Password File
ASMCMD> pwset --asm +DATA/orapwasm
Move the password file from one location to other
ASMCMD> pwmove --asm +FRA/orapwasm_bak +DATA/orapwasm
Delete the Password file with ASMCMD
ASMCMD> pwdelete +FRA/orapwasm_bak