Skip to main content
tbarua
Staff
Staff
January 14, 2025

Technical Tip: How to delete an admin user if the user is linked with a folder

  • January 14, 2025
  • 0 replies
  • 414 views
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