Page 1 of 2
delete contact/user
Posted: Thu Apr 30, 2015 12:50 pm
by snapon_admin
I'm trying to re-create (created once, but was told to delete, and now asked to re-add

) a new user/contact using Active Directory and keep getting an error that a user with that ID already exists. There is no user with that ID under Manage users in the admin menu, nor is there a contact with that ID in CCM. Where would I go to manually delete any trace of this user so I can re-create the account?
Re: delete contact/user
Posted: Thu Apr 30, 2015 3:21 pm
by ssax
Did you apply configuration after deleting it? Might want to give that a try and let us know if that works for you.
Re: delete contact/user
Posted: Thu Apr 30, 2015 3:51 pm
by snapon_admin
I did, and yep, still says user already exists.
Re: delete contact/user
Posted: Thu Apr 30, 2015 4:04 pm
by tgriep
For a test, can you disable the Active Directory Integration and see if you can add the user then?
Re: delete contact/user
Posted: Thu Apr 30, 2015 4:16 pm
by ssax
Also, all the check really does is try to find the user_id by username
So if you run this command:
Code: Select all
echo "select * from xi_users;" | psql nagiosxi nagiosxi
Does it list that user?
Re: delete contact/user
Posted: Thu Apr 30, 2015 4:48 pm
by snapon_admin
ssax wrote:Also, all the check really does is try to find the user_id by username
So if you run this command:
Code: Select all
echo "select * from xi_users;" | psql nagiosxi nagiosxi
Does it list that user?
Yep. Not sure I want to disable the AD integration on the prod server. Don't want to risk that borking something else.
Re: delete contact/user
Posted: Thu Apr 30, 2015 4:52 pm
by ssax
So it's still showing the user in the DB but it's not showing in the UI?
Re: delete contact/user
Posted: Thu Apr 30, 2015 5:16 pm
by snapon_admin
Correct.
Re: delete contact/user
Posted: Fri May 01, 2015 9:45 am
by ssax
Were they a monitoring contact as well? I'm whipping up some commands for you that will manually remove the remnants.
Re: delete contact/user
Posted: Fri May 01, 2015 10:20 am
by ssax
Find the user_id with this command (it's the number to the left of their username):
Code: Select all
echo "select * from xi_users;" | psql nagiosxi nagiosxi
Go to Admin > Users > Manage Users
Right-click on the X next to one of your users and select Copy Link Location.
Paste it into notepad, you should see something like this:
Code: Select all
http://ssc66xi/nagiosxi/admin/users.php?delete=1&user_id[]=18&nsp=f9dd99b34af0f946d528bfb48bea3163
Change:
To:
Code: Select all
user_id[]=YOUR_USER_ID_FROM_THE_FIRST_STEP
Paste it into your browser address bar and hit enter.
Now try to add the user again.