Saturday, August 26, 2023

How to Lock the user account in Linux ?

 


[root@10.1.1.1 ~]#

[root@10.1.1.1 ~]# passwd -l postgres

Locking password for user postgres.

passwd: Success


Check the user account status :


[root@10.1.1.1 ~]#

[root@10.1.1.1 ~]#

[root@10.1.1.1 ~]# passwd -S postgres

postgres LK 2022-10-04 -1 -1 -1 -1 (Password locked.)

[root@10.1.1.1 ~]#

[root@10.1.1.1 ~]#

How to check the lock status of any Linux user Account ?

 


If user Locked 


[root@10.1.1.1 ~]#

[root@10.1.1.1 ~]# passwd -S postgres

postgres LK 2022-10-04 -1 -1 -1 -1 (Password locked.)

[root@10.1.1.1 ~]#

[root@10.1.1.1 ~]#



If user Unlocked



[root@10.1.1.1 ~]#

[root@10.1.1.1 ~]#

[root@10.1.1.1 ~]# passwd -S postgres

postgres PS 2022-10-04 -1 -1 -1 -1 (Password set, SHA512 crypt.)

[root@10.1.1.1 ~]#

[root@10.1.1.1 ~]#



========================

LK: Password locked

NP: No password

PS: Password set

Thursday, August 24, 2023

"ORA-00942 : table or view does not exist. " on synonym

"ORA-00942- table or view does not exist" error you are getting , this indicate that user1 does not have privileges on the user.test table (get the details from synonyms SQL which tables are included ) .


We need to grant that required privileges 


SQL> GRANT SELECT, INSERT, UPDATE, DELETE 

     ON USER.TEST 

     TO USER1;



Note : Create dynamic sql to refersh the privelige if multiple tables and schema included 

Wednesday, August 23, 2023

How to chnage the global name of a database in AWS oracle RDS ?

 

We have to login as admin user 


exceute below commands 


EXEC rdsadmin.rdsadmin_util.rename_global_name(p_new_global_name => 'new_global_name');