Thursday, May 18, 2023

How to Add or Remove Linux User From Group : Linux OS

How to Add or Remove Linux User From Group ?


Add the User to a Group in Linux


[root@0.0.0.0~]# usermod -aG wheel atharv

[root@0.0.0.0~]#

[root@0.0.0.0~]#

[root@0.0.0.0~]#

[root@0.0.0.0~]#

[root@0.0.0.0~]# id atharv

uid=1002(atharv) gid=1002(dba) groups=1002(dba),10(wheel)

[root@0.0.0.0~]#



Remove the User from a Group in Linux



[root@0.0.0.0~]#

[root@0.0.0.0~]# gpasswd -d atharv wheel

Removing user atharv from group wheel

[root@0.0.0.0~]#

[root@0.0.0.0~]#

[root@0.0.0.0~]# id atharv

uid=1002(atharv) gid=1002(dba) groups=1002(dba)

[root@0.0.0.0~]#

[root@0.0.0.0~]#

Your account has expired; please contact your system administrator : Linux OS

Re-Enable user In Linux : Your account has expired; please contact your system administrator


[atharv@0.0.0.0~]$

[atharv@0.0.0.0~]$ su - atharv

Password:

Your account has expired; please contact your system administrator

su: User account has expired

[atharv@0.0.0.0~]$




Login as root user :


[root@0.0.0.0home]# chage -l atharv
Last password change                                    : May 18, 2023
Password expires                                        : never
Password inactive                                       : never
Account expires                                         : May 18, 2023
Minimum number of days between password change          : 0
Maximum number of days between password change          : 99999
Number of days of warning before password expires       : 7
[root@0.0.0.0home]#
[root@0.0.0.0home]#




[root@0.0.0.0home]#
[root@0.0.0.0home]#
[root@0.0.0.0home]# chage --expiredate 2023-05-19 atharv
[root@0.0.0.0home]#
[root@0.0.0.0home]#
[root@0.0.0.0home]# chage --list atharv
Last password change                                    : May 18, 2023
Password expires                                        : never
Password inactive                                       : never
Account expires                                         : May 19, 2023
Minimum number of days between password change          : 0
Maximum number of days between password change          : 99999
Number of days of warning before password expires       : 7
[root@0.0.0.0home]#

Monday, April 17, 2023

How to get public IP from AWS EC2 instance ?

 


Use Below command 


login as root 



curl http://checkip.amazonaws.com



[root@ip-173-11-11-11 ~]#

[root@ip-173-11-11-11~]# curl http://checkip.amazonaws.com

55.2232.1123.123341

[root@ip-173-11-11-11 ~]#

Complex Oracle 19c to PostgreSQL 15 Database Migration

Production-oriented migration approach for a complex Oracle 19c to PostgreSQL 15 workload , covering assessment, schema and code conversion,...