FortiPAM
FortiPAM allows you to protect, isolate and secure privileged account credentials, manage and control privileged user access, and monitor and record privileged account activity.
tbarua
Staff
Staff
Article Id 369778
Description

The article describes how to delete an admin user via CLI if the user is being used in another entry. 

Scope FortiPAM.
Solution

Admin user, test_1 in this example, can be deleted from FortiPAM Gui by selecting the admin user, and it shows the following notification:

 

admintest2.png

 

admintest1.png

 

After selecting OK, the admin account will be deleted accordingly. However, if the same account needs to be deleted from CLI, it shows the following error: 

 

mercury-kvm64 (admin) # delete test_1
The entry is used by other 1 entries
Command fail. Return code -23

 

To resolve the error, the linked folder has to be deleted in the first place. Here is the command to remove the folder:

 

mercury-kvm64 (folder) # config secret folder

mercury-kvm64 (folder) # delete <folder ID> 

mercury-kvm64 (folder) # end

 

After deleting the linked folder, test_1 can be deleted then from CLI: 

 

mercury-kvm64 # config system admin

mercury-kvm64 (admin) # delete test_1

mercury-kvm64 (admin) # end