无法用非root用户执行imcl websphere命令。

问题描述 投票:0回答:1

我在Linux服务器上使用非root用户尝试websphere imcl命令,得到以下错误。

$ /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.

WebSphere可能是用root用户安装的,但我不确定。

然而,我检查了 /was/var/IBM 和其他文件夹的权限。在我看来,它们都很好。

[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

我知道我的安装管理器是安装在 Administrator mode 而不是 Nonadministrator mode 然而,是否有一个调整的工作,使其工作在 Nonadministrator mode 使得该命令能与 user1 ?

https:/www.ibm.comsupportknowledgecenterenSSSHTQ_8.1.0com.ibm.netcool_OMNIbus.doc_8.1.0omnibuswipinstalltaskomn_ins_im_installing_im_gui.html

请你让我知道如何才能获得我的 imcl 命令以非root用户身份运行,即 user1 命令,而不需要 sudoroot 用户?

linux command-line websphere root privileges
1个回答
1
投票

不幸的是,正如你已经指出的,你的IM是以root身份安装的。没有支持的方法可以将root安装改为非root安装--请检查这个--。https:/www.ibm.commysupportsquestion0D50z000062kDOVCA2change-installation-manager-user-to-nonroot?language=en_US

所以您有3个选择。

  1. 继续使用root账户进行任何安装更新相关的任务
  2. 为你的user1账户配置sudo,然后他就可以做了。sudo imcl... 如果你的sysadmins不想给你sudo来执行更多的命令的话 可以只为imcl配置sudo。
  3. 在非root用户账户上全部重装。

对于选项3,这取决于你已经使用该IM安装了多少产品,如果只是WAS,可能值得备份配置文件,删除所有,重新安装并恢复配置文件配置。如果你有更多的产品,或者是复杂的产品,比如BPMBAW,那么我建议继续选择方案2。

© www.soinside.com 2019 - 2024. All rights reserved.