Loading

×Sorry to interrupt
This page has an error. You might just need to refresh it.
[NoErrorObjectAvailable] Uncaught ReferenceError: addCTracking is not defined
Failing descriptor: {markup://c:KM_ArticleThemeLayout}

Refresh

Cookie Preference Center

General Information on cookies

When you visit our website, we use cookies to ensure that we give you the best experience. This information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies by clicking on the different category headings to find out more and change your settings. However, blocking some types of cookies may impact your experience on the site and the services we are able to offer. Further information can be found in our

Cookie Policy.

Strictly Necessary

Strictly Necessary

Always Active

Strictly Necessary

Strictly necessary cookies are always enabled since they are essential for our website to function. They enable core functionality such as security, network management, and website accessibility. You can set your browser to block or alert you about these cookies, but this may affect how the website functions. For more information please visit www.aboutcookies.org or www.allaboutcookies.org.

Cookie Details‎

Performance

Performance

Performance

Performance cookies are used to analyze the user experience to improve our website by collecting and reporting information on how you use it. They allow us to know which pages are the most and least popular, see how visitors move around the site, optimize our website and make it easier to navigate.

Cookie Details‎

Please confirm your settings by refreshing the page.

Functional

Functional

Functional

Functional cookies help us keep track of your past browsing choices so we can improve usability and customize your experience. These cookies enable the website to remember your preferred settings, language preferences, location and other customizable elements such as font or text size. If you do not allow these cookies, then some or all of these services may not function properly.

Cookie Details‎

Advertising

Advertising

Advertising

Advertising cookies are used to send you relevant advertising and promotional information. They may be set through our site by third parties to build a profile of your interests and show you relevant advertisements on other sites. These cookies do not directly store personal information, but their function is based on uniquely identifying your browser and internet device.

Cookie Details‎

Advertising Cookies

Consent Leg.Interest

Select All Vendors

Select All Vendors

Select All Hosts

Select All

Clear Filters

Information storage and access

Apply

Confirm My Choices Reject All Allow All

My Subscriptions

Loading

Knowledge Base

Unable to add Local Administrator user to vCenter Server Appliance with error "Error in executing command: 8002" (66958)

Last Updated: 7/6/2021Categories: TroubleshootingTotal Views: 12630Language:
English

1 like this article

Subscribe to get an email
newsletter with new updates

1 people found this helpful Please provide article feedback:

Symptoms

Failed to add  Local Administrator user through vCenter Server Appliance shell. For more information about adding Local User Accounts to VCSA, See Create a Local User Account in the vCenter Server Appliance

Command> localaccounts.user.add --role admin --username Administrator --password
Enter password:
Reenter password:
Error in executing command: 8002

The applmgmt.log contains entries similar to:

Note: appmgmt.log can be found in /var/log/vmware/applmgmt/applmgmt.log

2018-12-27T00:42:45.696 [15590]DEBUG:vmware.appliance.localaccounts.impl:Executing operation /usr/sbin/useradd ['Administrator', '-m', '-c', 'Administrator', '-G', 'admin']
2018-12-27T00:42:45.723 [15590]DEBUG:vmware.appliance.localaccounts.impl:Operation output = b'', error = b"useradd: user 'Administrator' already exists\n" returncode = 9
2018-12-27T00:42:45.724 [15590]ERROR:vmware.appliance.localaccounts.impl:User add failed: [Failure instance: Traceback: : pint.Error('com.vmware.applmgmt.err_operation_failed', 'Operation Failed.', **{})

or

2020-12-02T15:31:22.470 [10663]ERROR:vmware.appliance.localaccounts.impl:GenericErrorBack: pint.Error('com.vmware.applmgmt.err_add_user_failed', 'Failed to add user.', **{})
2020-12-02T15:31:22.480 [10663]CRITICAL:twisted:Unhandled Error
Traceback (most recent call last):
File "/usr/lib/python3.5/site-packages/twisted/internet/_baseprocess.py", line 64, in maybeCallProcessEnded
proto.processEnded(Failure(reason))
File "/usr/lib/python3.5/site-packages/twisted/internet/utils.py", line 163, in processEnded
self.deferred.callback((out, err, code))
File "/usr/lib/python3.5/site-packages/twisted/internet/defer.py", line 459, in callback
self._startRunCallbacks(result)
File "/usr/lib/python3.5/site-packages/twisted/internet/defer.py", line 567, in _startRunCallbacks
self._runCallbacks()
--- <exception caught here> ---
File "/usr/lib/python3.5/site-packages/twisted/internet/defer.py", line 653, in _runCallbacks
current.result = callback(current.result, *args, **kw)
File "/usr/lib/applmgmt/transport/py/vmware/vherd/transport/xmlrpc.py", line 233, in unauthorized_cb
failure.trap(authorization.AuthorizationError)
File "/usr/lib/python3.5/site-packages/twisted/python/failure.py", line 346, in trap
self.raiseException()

Note:The preceding log excerpt are only examples. Date, time and environmental variables may vary depending on your environment.

Cause

Adding Administrator user may fail because of two reasons:

root password is expired

A Local Administrator Account "lsass" is added to nsswitch.conf file.

Resolution

If the failure is because root password is expired:

The applmgmt.log shall include the below:

2020-12-02T15:31:22.480 [10663]CRITICAL:twisted:Unhandled Error
Traceback (most recent call last):
File "/usr/lib/python3.5/site-packages/twisted/internet/_baseprocess.py", line 64, in maybeCallProcessEnded
proto.processEnded(Failure(reason))
File "/usr/lib/python3.5/site-packages/twisted/internet/utils.py", line 163, in processEnded
self.deferred.callback((out, err, code))
File "/usr/lib/python3.5/site-packages/twisted/internet/defer.py", line 459, in callback
self._startRunCallbacks(result)
File "/usr/lib/python3.5/site-packages/twisted/internet/defer.py", line 567, in _startRunCallbacks
self._runCallbacks()
--- <exception caught here> ---
File "/usr/lib/python3.5/site-packages/twisted/internet/defer.py", line 653, in _runCallbacks
current.result = callback(current.result, *args, **kw)
File "/usr/lib/applmgmt/transport/py/vmware/vherd/transport/xmlrpc.py", line 233, in unauthorized_cb
failure.trap(authorization.AuthorizationError)
File "/usr/lib/python3.5/site-packages/twisted/python/failure.py", line 346, in trap
self.raiseException()

To verify root password expiry, run the below command:

# chage -l root

If you got the below output, then the password expired

To reset the rood password from Shell , run the below command

# passwd

Now try the command again, it will work.

If the failure is because a Local Administrator Account "lsass" is added to nsswitch.conf file.

The applmgmt.log shall include the below:

2018-12-27T00:42:45.696 [15590]DEBUG:vmware.appliance.localaccounts.impl:Executing operation /usr/sbin/useradd ['Administrator', '-m', '-c', 'Administrator', '-G', 'admin']
2018-12-27T00:42:45.723 [15590]DEBUG:vmware.appliance.localaccounts.impl:Operation output = b'', error = b"useradd: user 'Administrator' already exists\n" returncode = 9
2018-12-27T00:42:45.724 [15590]ERROR:vmware.appliance.localaccounts.impl:User add failed: [Failure instance: Traceback: : pint.Error('com.vmware.applmgmt.err_operation_failed', 'Operation Failed.', **{})

To verify that there is Administrator Account "lsass" is already added, run the below commands:

1-

# getent passwd | grep "Administrator"
You should get the below output
Hostname\Administrator:x:1500:1800::/:/bin/sh

2-
# grep lsass /etc/nsswitch.conf
You should get the below output
passwd: files ato lsass
group: files lsass

Now you need to remove the  lsass from the nsswitch.conf file as below:

Navigate to the file directory using cd command

# cd /etc/

Important: Take a backup from the the nsswitch.conf file before doing any changes.
# cp nsswitch.conf nsswitch.con.old

Using a Text Editor  vi , remove the lsass from the  nsswitch.conf file

Before:
passwd: files ato lsass
group: files lsass

After:
passwd: files ato
group: files

Save and close

Now try the command again, it will work.

Detectable by VMware SkylineTM

Actions

Copy

link to clipboard
copied!

Print

Language:
English

Attachments

Additional Resources

KB
•
End Of General Availability of the Free vSphere Hypervisor (ESXi 7.x and 8.x) (2107518)

KB
•
Download and Install VMware Fusion (2014097)

KB
•
Downloading and Installing the standalone VMware Remote Console (VMRC) in vSphere (2091284)

Results 1-3 of 3

Ask The Community

Get answers quickly from VMware experts in the community

Post Subject

CONTINUE IN COMMUNITIES

Related Products:

VMware vCenter Server Appliance

Related Versions:

VMware vCenter Server Appliance 6.7.x

VMware vCenter Server Appliance 6.5.x

Take Our Survey

Support Assistant