On Unix based system, only privileged user (root) can start process with port number less than 1025 but if the owner of Weblogic process is a non-privileged user, how to let the user start Weblogic with port 80?
Step 1. Log in Weblogic Admin Console.
Step 2. Create Machine. Lock & Edit→Environment→Machines→New→Name:[MachineName], Machine OS:[Unix]→OK.
Step 3. Enable Post-Binding. Open machine configuration→General→Click “Enable Post-Bind UID”, Post-Bind UID:[non-privileged user id]→”Enable Post-Bind GID”, Post-Bind GID:[non-privileged user group id].
Step 4. Assign Server to Machine. Open machine configuration→Servers→Add→[Select the Server you want to assign to the machine]→Finish.
Step5. Change the port number of the Server. Open server configuration→General→Listen Port:→Save→Active Changes.
Stop Weblogic and use “root” to start Weblogic. Although “root” start the Weblogic process, the process owner will be switched to the non-privileged user.
Step6. If we only can use the non-privileged user to start the Weblogic process, we should add the non-privileged user to sudo file and allow the user to execute sudo command. Execute “su – root” to switch to root user→Execute “visudo”→Add “[the non-privileged user id] ALL=(ALL) ALL” to the file.
Stop Weblogic, switch to the non-privileged user, and execute “sudo ./startWebLogic.sh” and insert the password of the non-privileged user to start the process.
If we use background execution to start Weblogic and have no chance to enter the password, then add “NOPASSWD:” in the sudo file.
[the non-privileged user id] ALL=(ALL) NOPASSWD: ALL
Restrict the privilege to execute the commands under /opt/bea/user_projects/domains/base_domain/
[the non-privileged user id] ALL=(ALL) NOPASSWD: /opt/bea/user_projects/domains/base_domain/