Skip to main content

Posts

Showing posts from April, 2020

Query to Find Incompatibilities for Concurrent Program in Oracle Apps R12

Query to Find Incompatibilities for Concurrent Program in Oracle Apps R12 Script: SELECT distinct fat.application_id,                 to_run_concurrent_program_id,                 fat.APPLICATION_NAME,                 fcpt.user_concurrent_program_name,                 DECODE(TO_RUN_TYPE, 'S', 'Set', 'Program') TYPE,                 DECODE(INCOMPATIBILITY_TYPE, 'G', 'Global', 'Domain') "Incompatibilty Type"   FROM FND_CONCURRENT_PROGRAM_SERIAL fcps,        FND_CONCURRENT_PROGRAMS_TL    fcpt,        FND_APPLICATION_TL            fat  WHERE fcps.RUNNING_APPLICATION_ID = fat.application_id    AND fcpt.CONCURRENT_PROGRAM_ID = fcps.TO_RUN_CONCURRENT_PROGRAM_ID   ...

Query to Find the Concurrent Manager for a Concurrent Program

Query to Find the Concurrent Manager for a Concurrent Program Script: SELECT distinct fcqc.INCLUDE_FLAG,        fcqc.QUEUE_APPLICATION_ID,        fcq.USER_CONCURRENT_QUEUE_NAME,        fcp.CONCURRENT_PROGRAM_NAME   FROM APPLSYS.FND_CONCURRENT_QUEUE_CONTENT fcqc,        APPLSYS.FND_CONCURRENT_PROGRAMS fcp,        APPS.FND_CONCURRENT_QUEUES_TL fcq  WHERE     type_id = fcp.concurrent_program_id AND fcp.concurrent_program_name = '&PROGRAM_SHORT_NAME'   and fcqc.INCLUDE_FLAG='I'        AND fcq.concurrent_queue_id = fcqc.concurrent_queue_id;

Understanding SUID, SGID and Sticky bit in Linux

Understanding SUID, SGID and Sticky bit in Linux There are 3 types of special permission that can be set on files and directories.  1. SUID permission 2. SGID permission 3. Sticky bit Set-user Identification (SUID) Check for the permission of /usr/bin/passwd command :   # ls -lrt /usr/bin/passwd -r-sr-sr-x   1 root     sys        31396 Jan 20  2014 /usr/bin/passwd or  # ls -l /bin/su  -rwsr-xr-x-x 1 root user  16384 Jan 12 2014 /bin/su If you check cautiously, you would locate the 2 S's in the permission field. The main s represents the SUID and the subsequent one represents SGID.  When an command or script with SUID bit set is run, its viable UID turns into that of the owner of the file, as opposed to of the user who is running it. The setuid permission displayed as an “s” in the owner’s execute field. How to set SUID on a file? # chmod 4555 [pa...

How to use FTPS or SSL with FTP on Linux

How to use FTPS or SSL with FTP on Linux Ftp uses port 21 for connection, if we want to use secure connection/transfers over ftp we can use below configuration. In this post I am using  1) VSFTPD(Very Secure FTP Daemon) 2) OpenSSL for certificate To install both packages, run below yum install vsftpd yum install openssl  Create Certificate and keys using OpenSSL openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout /etc/vsftpd/vsftpd.pem -out /etc/vsftpd/vsftpd.pem Generating a 1024 bit RSA private key ....++++++ .....................++++++ writing new private key to '/etc/vsftpd/vsftpd.pem' ----- You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter '.', the...

How to Start and Stop vsftpd in Linux

How to Start and Stop vsftpd in Linux vsftpd RPM installs the /etc/rc.d/init.d/vsftpd script, which can be accessed via  /sbin/service command. To start the server, as root : /sbin/service vsftpd start To stop the server, as root : /sbin/service vsftpd stop To restart the server, as root type: /sbin/service vsftpd restart The condrestart (conditional restart) option only starts vsftpd if it is currently running.  It does not start the daemon if it is not running. To conditionally restart the server, as root : /sbin/service vsftpd condrestart

Error: The certificate /usr/share/rhn/ULN-CA-CERT is expired in Linux

Error: The certificate /usr/share/rhn/ULN-CA-CERT is expired in Linux While running yum utility if we are getting error with certificate expired for the repository. Then we can download the new correct certificate. Error Message: The certificate /usr/share/rhn/ULN-CA-CERT is expired. Please ensure you have the correct certificate and your system time is correct. To update the client SSL certificate on your Oracle Linux machine, run the following steps.         # cp /usr/share/rhn/ULN-CA-CERT /usr/share/rhn/ULN-CA-CERT.old         # wget https://linux-update.oracle.com/rpms/ULN-CA-CERT.sha2         # cp ULN-CA-CERT.sha2 /usr/share/rhn/ULN-CA-CERT

Setup a password less SSH Connectivity Quickly on Linux

Setup a password less SSH Connectivity Quickly on Linux We can use ssh to connect between servers, but many times it is required to setup a password less connectivity between the servers. We can follow below steps to quickly setup password less ssh. 1) Generate ssh keys on Source system using below command. ssh-keygen 2) Copy the ssh keys to the remote system where we need password less connectivity. ssh-copy-id userid@remote-host It will prompt for password first time. 3) Once above step is completed, Please try ssh and it will connect without password. ssh himanshu@lfcs.lab

Enforcing strong passwords in Linux using PAM (Pluggable Authentication Modules)

Enforcing strong passwords in Linux using PAM (Pluggable Authentication Modules) In this post I am going to share how can we force users to set strong passwords in Linux using  pam_cracklib module in PAM. It will help to provide security for all users on the system.  Note: If root is changing password for any user then this policy will not effect for root user. Root will bypass the policy. Example: Prompt 2 times for password change else will error in case of an error 8 characters minimum length (minlen option) at least 6 characters should be different from old password when entering a new one (difok option) at least 1 digit (dcredit option) at least 1 uppercase (ucredit option) at least 1 other character (ocredit option) at least 1 lowercase (lcredit option) Edit the /etc/pam.d/passwd file and enter  as: #%PAM-1.0 password required pam_cracklib.so retry=2 minlen=8 difok=6 dcredit=-1 ucredit=-1 ocredit=-1 lcredit=-1 password required pam_un...

Enabling Custom SSH Banner in Linux

Enabling Custom SSH Banner in Linux  We can enable custom banner which user can see when they login via SSH. Steps: 1) Banner is by default disabled in sshd. 2) Login as the root user and create a custom login banner file: # vi /etc/ssh/sshd-banner Enter a Custom Text like below Welcome to Himanshu's Server Remote Login! 3) Open sshd configuration file /etc/sshd/sshd_config using a text editor: # vi /etc/sshd/sshd_config 4) Add/edit the following line: Uncomment Banner line and put your custom banner file path. # no default banner path Banner /etc/ssh/sshd-banner 5) Save file and restart the sshd server: # /etc/init.d/sshd restart or #service sshd restart 6) Test your new banner by trying to login using ssh $ ssh bob@lfcs.lab

Re-Create EBS 12.2.x Weblogic Domain

Re-Create EBS 12.2.x Weblogic Domain In EBS R12.2 version Weblogic is configured and in case any files gets corrupted/deleted in Domain it will majorly impact the EBS application. We can perform below steps to recreate the Weblogic Domain 1) Make sure database and listener are running. 2) Stop all application services or kill them if required. 3) Source the RUN environment 4) Run  $FND_TOP/bin/txkrun.pl -script=ChkEBSDependecies -server=ALL_SERVERS 5) cd $FND_TOP/patch/115/bin    perl txkEBSDomainConfig.pl Below prompts are shown by the script:   Enter the full path of Applications Context File [DEFAULT - ]: Complete path of the RUN context file   Enter the server start mode for the domain [DEFAULT - prod]: prod   Enter the APPS schema password :   Enter weblogic admin server password : Sample Output: SUCCESS: VALID FMW HOME /u01/oracle/PROD/fs1/FMW_Home SUCCESS: VALID OHS HOME /u01/oracle/PROD/fs1/...

Multi-Factor Authentication in Linux using Google Authenticator

Multi-Factor Authentication in Linux using Google Authenticator I would setting up a multifactor authentication in my Centos 7 for a user Kevin for ssh connectivity. 1) Add the EPEL (Extra Packages for Enterprise Linux) repo. sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarc h.rpm 2) Install the google-autheticator sudo yum install google-authenticator 3) Run the google autheticator app for the user for which we want to setup the MFA. Note secret key and Verification code will be shown which would be needed for setting up google Autheticator on Android/Iphone google-authenticator It will prompt you certain questions as below , Provide the mentioned values [kevin@lcfs ~]$ google-authenticator Do you want authentication tokens to be time-based (y/n) y Warning: pasting the following URL into your browser exposes the OTP secret to Google: Do you want me to update your "/home/kevin/.google_authenticator" file? (y/n) y ...

[opmn] [ERROR:1] [] [internal] /u01/APPS/GPROD/fs1/FMW_Home/webtier/opmn/bin/opmn: unexpected exit: status 200

[opmn] [ERROR:1] [] [internal] /u01/APPS/GPROD/fs1/FMW_Home/webtier/opmn/bin/opmn: unexpected exit: status 200 OPMN fails to start running adstartall.sh in a 12.2 environment and returns a message to check file adopmnctl.txt. Error: [opmn] [ERROR:1] [] [internal] /u01/APPS/GPROD/fs1/FMW_Home/webtier/opmn/bin/opmn: unexpected exit: status 200 Cause: It might be due to corruption of directory Solution: 1. Stop all services. 2. Rename the directory: OPMN/opmn/states  (eg. /u01/APPS/GPROD/fs1/FMW_Home/webtier/instances/EBS*/config/OPMN/opmn/states in the example above.) 3. Restart the services and confirm the error no longer occurs.

How to Allow|Deny SSH Access To A Particular User|Group In Linux

How to Allow|Deny SSH Access To A Particular User|Group In Linux To Make any changes in ssh we have to edit configuration file in Linux. File name: /etc/ssh/sshd_config After making the any Changes to the above file we have to restart sshd services with below command service sshd restart Configuration Changes Examples for User|Groups 1) Allow ssh access from only one user Edit the ssdd_config file and add|edit below AllowUsers himanshu 2) Allow ssh access from multiple users  Edit the ssdd_config file and add|edit below AllowUsers himanshu bob kevin 3) Allow ssh access from a particular group AllowGroups dba 4) Deny ssh access from only one user Edit the ssdd_config file and add|edit below DenyUsers himanshu 5) Deny ssh access from multiple users Edit the ssdd_config file and add|edit below DenyUsers himanshu bob 6) Deny ssh access from group Edit the ssdd_config file and add|edit below DenyGroups dba

Linux Shell Script to Create Multiple User, Set Password and Expire Password

Linux Shell Script to create Multiple Users and Expire Password Example Script to create multiple users in linux at same time.Remember this has to be executed via administrative user or root. for u in kevin nancy scott ; do useradd $u echo "$u:Password1" | chpasswd passwd -e $u done We can also create a file and pass any number of users. Sample file $ cat newusers himanshu kevin bob marley nancy for u in `cat  newusers`  ; do useradd $u echo "$u:Password1" | chpasswd passwd -e $u done

Providing Root Privileges to User/Group in Linux

Providing Root Privileges User/Group in Linux If we need to provide any user the privileges as root user to perform any administrative task, we can do via giving sudo access. The important commands and file related to provide these privileges are as below: 1) File which Controls this privilege /etc/sudoers 2) If we want to edit /etc/sudoers file then use following command  visudo 3) We need to change permission in below line in /etc/sudoers file. 4) Syntax for adding sudo permission username host_list = (users) command username : This corresponds to the user to which sudo access need to be provided host_list: This defines the hosts on which the user is allowed sudo access users: This defines the users as which ‘username’ can execute the commands command : This defines the commands that the user is allowed to execute as root/another user. 5)  Allow a specific user to run any commands as any user in a...

Installing CentOS 7 on Virtual Box

Installing CentOS 7 on Virtual Box In this post I would share the steps for how to setup a Linux environment on a Home system/laptop/desktop. Download requirements: 1)  VirtualBox--It is a virtualisation software. You can download latest version as per your operating system. https://www.virtualbox.org/   2) CentOS 7 Operating system -Download the ISO image https://wiki.centos.org/Download Installing Virtual Box Installing Virtual Box on Windows is direct and easy. Start the Installer and Proceed as per below steps. Once the installation is complete. Please Start Virtual box and verify! Installing CentOS 7 on Virtual Box 1) Open Virtual Box and Click on New 2) Provide the details as per below screens 3) Select the appropriate RAM. I have selected 3 GB Ram for my Virtual Machine.  4) Select to create a harddisk 5) Select Type of hard disk as VDI. 6) Select Storage as dyna...