Change run level on Red Hat/Fedora/CentOS

Change the default run level on Red Hat/Fedora/CentOS distros to boot into server/console mode rather than GUI (from runlevel 5 to runlevel 3).

As root, edit /etc/inittab using vi or vim.  It should be somewhat self-explanatory, however make this change:

# id:5:initdefault:

id:3:initdefault:

enable windows manager in linux vncserver

Modify your ~/.vnc/xstartup file to

The default file looks like this:

#!/bin/sh

# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc

Uncomment the “unset SESSION MANAGER” and “exec /etc/X11/xinit/xinitrc” line.  This will start run your default window manager when vnc starts.  Gnome is a lot prettier than the cruddy default gray vnc display with xterm.

Edit sudoers file in Redhat/Fedora/CentOS

To allow certain users to act as root (su -, or sudo), you must add them to the sudoers file (/etc/sudoers).

The sudoers file must be edited using the visudo command.  See the sudo webpage.

As root:

visudo -f /etc/sudoers

Edit the file to add the correct permissions.  In this case, give members of the group “adm” permission to do just about everything.

%adm     ALL=(ALL)     NOPASSWD: ALL

Save the changes using “:wq”

 

 

Default WebLogic KeyStore Password/PassPhrase

WebLogic comes with default keystores for client and server security enabled.  However, I have found it problematic to find and remember the passwords/passphrases for the default keystores.

Property

Value

Trust store location

%ORACLE_HOME%/weblogic/wlserver_10.3/ server/lib/DemoTrust.jks

Trust store password

DemoTrustKeyStorePassPhrase

Key store location

%ORACLE_HOME%/weblogic/wlserver_10.3/ server/lib/DemoIdentity.jks

Key store password

DemoIdentityKeyStorePassPhrase

Private key password

DemoIdentityPassPhrase

Property

Value

Trust store location

%ORACLE_HOME%/weblogic/wlserver_10.3/ server/lib/DemoTrust.jks

Trust store password

DemoTrustKeyStorePassPhrase

Key store location

%ORACLE_HOME%/weblogic/wlserver_10.3/ server/lib/DemoIdentity.jks

Key store password

DemoIdentityKeyStorePassPhrase

Private key password

DemoIdentityPassPhrase

Installing CA certificates

Instructions on how to add CA certificates into a SSLCACertificateFile from Trustis.com.

Installing CA certificates

On startup, Stronghold loads CA certificates from the file specified by the SSLCACertificateFile entry in its ‘httpd.conf’ file.
To install the PEM format bundled CA certificate file, reference it in the httpd.conf file. as follows

  • Ensure that you have saved the PEM format bundled CA certificate as a text file.
  • Open your ‘httpd.conf’ file and find the SSLCACertificateFile entry.  By default the entry will be SSLCACertificateFile=’/ssl/CA/client-rootcerts.pem’.  You will find ‘httpd.conf’ in the directory /conf.
  • Open the file identified by SSLCACertificateFile (for example, /ssl/CA/client-rootcerts.pem) in a text editor.
  • Open the file that contains the PEM format bundled CA certificates (e.g. cachainpem.txt) in a text editor.
  • Copy the contents of this PEM format bundled CA certificate file
    (including all the ‘—–BEGIN CERTIFICATE—–‘ and ‘—–END CERTIFICATE—–‘ lines)
    to the clipboard.
  • Now Paste what you have just copied into the file identified by SSLCACertificateFile.
    In most cases you will want to insert the bundle CA certificate at the end of the file and add a comment to identify the certificate.
  • Save the modified file and close the text editor.
  • Restart your web server.

Reset the WebLogic admin password

I have been configuring WebLogic domains (version 9.2) and came across the situation where I had made a mistake in entering the initial weblogic user password.  This was preventing me from starting up my weblogic instance, as I couldn’t get the password right.  To reset the password, do the following (courtesy of JavaRanch):

Change directory into your domain directory.

Create a new boot.properties file with the contents:

username=weblogic

password=weblogic

Run the reset command for the admin account (the period at the end is required… you may have to include the full path to the jvm and to to the weblogic.jar):

java -cp weblogic.jar weblogic.security.utils.AdminAccount weblogic weblogic .

Move the ldap directory to ldap.old (this directory is at <domain>/data/ldap)