Search code examples
linuxcommand-linewebsphererootprivileges

Unable to execute imcl websphere command with non-root user


I'm trying websphere imcl command using non-root user on a Linux server where I get the below error:

$ /was/IBM/InstallationManager/eclipse/tools/imcl listAvailablePackages -repositories /was/setup/repository.config

CRIMC1018E ERROR: Administrator privileges are required.

Explanation: You started the Installation Manager in administrator mode, but you do not have the required administrator privileges. On Microsoft Windows XP Professional, you must be a member of an administrator group. On Windows Vista, Windows 2008, Windows 7, Windows 8, and Windows 10, you must use the Run as administrator option. On Linux, UNIX, Mac OS X, IBM i, and z/OS, you must have root privileges.

User Action: To use the Run as administrator option on Windows:
1. Right-click the executable icon.
2. Select Run as administrator.
3. Enter an administrator password when prompted for either an administrator password or a confirmation.
4. Click Continue.
00:00.47 ERROR [main] com.ibm.cic.agent.core.application.HeadlessApplication run
  CRIMC1018E Administrator privileges are required.
  You started the Installation Manager in administrator mode, but you do not have the required administrator privileges. On Microsoft Windows XP Professional, you must be a member of an administrator group. On Windows Vista, Windows 2008, Windows 7, Windows 8, and Windows 10, you must use the Run as administrator option. On Linux, UNIX, Mac OS X, IBM i, and z/OS, you must have root privileges.
  To use the Run as administrator option on Windows:
  1. Right-click the executable icon.
  2. Select Run as administrator.
  3. Enter an administrator password when prompted for either an administrator password or a confirmation.
  4. Click Continue.

The WebSphere may have been installed using the root user, however I'm not sure.

However, I checked that the /was and /var/IBM and other folder permissions. They all look fine to me.

[user1@myhost~]$ ls -ld /var
drwxr-xr-x. 23 root root 4096 Apr 27 20:03 /var
[user1@myhost~]$ ls -ld /var/IBM
drwxr-xr-x 3 user1 was 33 Apr 16 13:20 /var/IBM
[user1@myhost~]$ ls -ld /was
drwxr-xr-x 4 user1 was 30 Apr 16 13:33 /was
[user1@myhost~]$ ls -ld /was/IBM
drwxr-xr-x 6 user1 was 151 Apr 23 18:53 /was/IBM
[user1@myhost~]$ ls -ltr /was/IBM/InstallationManager/eclipse/tools/imcl
-rwxr-xr-x 1 user1 was 71223 Apr 16 13:20 /was/IBM/InstallationManager/eclipse/tools/imcl
[user1@myhost~]$ ls -ltr /was/setup/repository.config
-rwxr-xr-x 1 user1 was 524 Mar  6 09:53 /was/setup/repository.config
[user1@myhost~]$ ls -ld /was
drwxr-xr-x 8 user1 was 91 Apr 27 14:04 /was
[user1@myhost~]$ ls -ld /was/setup
drwxr-xr-x 7 user1 was 4096 Apr 16 17:41 /was/setup

I understand that my Installation Manager was installed in Administrator mode instead of Nonadministrator mode however is there a tweak work around to make it work in Nonadministrator mode so that the command works with user1 ?

https://www.ibm.com/support/knowledgecenter/en/SSSHTQ_8.1.0/com.ibm.netcool_OMNIbus.doc_8.1.0/omnibus/wip/install/task/omn_ins_im_installing_im_gui.html

Can you please let me know how can I get the imcl command to run as non-root user i.e user1 without the need of sudo or root user?


Solution

  • Unfortunately, as you already noted, your IM was installed as root. There is no supported way to change root install to non-root - check this - https://www.ibm.com/mysupport/s/question/0D50z000062kDOVCA2/change-installation-manager-user-to-nonroot?language=en_US

    So you have 3 options:

    1. Continue to use root account for any install/update related tasks
    2. Configure sudo for your user1 account, then he will be able to do: sudo imcl... Your sysadmins can configure sudo just for imcl, if they dont want to give you sudo for more commands.
    3. Reinstall all on non-root user account.

    For option 3, it depends how many products you have already installed using that IM, if it is just WAS, it might be worth to backup profile, remove all, reinstall and restore profile configuration. If you have more products, or complex ones, like BPM/BAW for example, then I would suggest stay with option 2.