There is no easy way to do it. There aren't any options you can set to exclude them ... lame as it is. I had to hijack the search page to do this.
I also change the "People" link in the top header bar to have a default search that removes the unwanted account(s). Some thing like this ...
What this is doing is returning every one from A to ZZZZ (which should be everyone) except anything with admin in it. The reason for this is when you click the people link it will show you everyone at first ... including the people you don't want to see. So, to avoid these people showing I just start the people search process with a default search string that removes them.
If you are using LDAP or AD, you can exclude users or groups of users with an LDAP query string filter
Its a little tricky, but this doc describes it pretty well. https://confluence.atlassian.com/display/CROWD/Restricting+LDAP+Scope+for+User+and+Group+Search
These "Crowd" fields are found in Confluence when configuring your LDAP User Directory (Admin > Users & Security > User Directories). Among other, you have to specify the LDAP schema and then your user object filter (or group object filter) like described in above link. This is especially useful if you have ex-employee or service accounts and you want to remove them from counting against your Confluence license (and also will fall out of the People Directory).
Hope that helps maybe down the line as you go.
I do not consider admin a "service account". A "service account" is an account often found in ADs/LDAPs to perform a service without a human. An "admin" account I think always has a user associated with it. However, point taken. An admin with that name shown in the People DIrectory does not make sense, and yes, filters removes from system. So all depends on what they are after in the People Directory.
You could write a custom plugin to extract certain users information from the Lucene search index. This would remove them out of the directory.
Perhaps add the users to a particular group, then remove group members.This is similar to a "Do Not Index" plugin I wrote recently which removes pages based on their label
You can alter the template of the people directory which is located at: confluence/confluence/users/peopledirectory-results.vm
Just wrap an if-statement around the code that outputs the profile macro to check the username or which group the user belongs to.
In this case I hide all users inside the group confluence-administrators:
#if (!$userAccessor.hasMembership('confluence-administrators', $person))
Badges are a great way to show off community activity, whether you’re a newbie or a Champion.Learn more
Hi Community, Jessica here from the Confluence Product Marketing team! July’s community challenge is all about sharing pictures — and as an extension of our first post on what ...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs