<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Column comparison for authentication in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Column-comparison-for-authentication/m-p/172049#M49322</link>
    <description>&lt;P&gt;This might not be the best solution but... &lt;BR /&gt;
You can | append the usernames from the db to the result of the search. Instead of using 2 columns you'll end up with 1 column with every username. After that just use: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|stats count by username
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then you just use search to filter results:&lt;BR /&gt;
For users on both places:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; ...| search count =2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;For users only in one place:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; ...| search count &amp;lt; 2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you want to know where they are you could even use values(source) in the stats command&lt;/P&gt;</description>
    <pubDate>Mon, 17 Aug 2015 15:48:58 GMT</pubDate>
    <dc:creator>diogofgm</dc:creator>
    <dc:date>2015-08-17T15:48:58Z</dc:date>
    <item>
      <title>Column comparison for authentication</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Column-comparison-for-authentication/m-p/172048#M49321</link>
      <description>&lt;P&gt;Hi, &lt;/P&gt;

&lt;P&gt;I created a search which provides me with the usernames of all user which have logged on, i have another column right now which is from a database containing all the authenticated usernames. I want to check that all usernames in the first column are in the database. &lt;/P&gt;

&lt;P&gt;I tried using:&lt;BR /&gt;
&lt;CODE&gt;eval Results=if(match(Loggedin_user,username), "yes","no"&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;but doesnt work. I need a way to loop through the Loggedin_user column verifying that the username is in the username column. &lt;/P&gt;

&lt;P&gt;Any suggestion on how to do this? &lt;/P&gt;</description>
      <pubDate>Mon, 17 Aug 2015 12:09:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Column-comparison-for-authentication/m-p/172048#M49321</guid>
      <dc:creator>qazwsxedc994</dc:creator>
      <dc:date>2015-08-17T12:09:48Z</dc:date>
    </item>
    <item>
      <title>Re: Column comparison for authentication</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Column-comparison-for-authentication/m-p/172049#M49322</link>
      <description>&lt;P&gt;This might not be the best solution but... &lt;BR /&gt;
You can | append the usernames from the db to the result of the search. Instead of using 2 columns you'll end up with 1 column with every username. After that just use: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|stats count by username
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then you just use search to filter results:&lt;BR /&gt;
For users on both places:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; ...| search count =2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;For users only in one place:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; ...| search count &amp;lt; 2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you want to know where they are you could even use values(source) in the stats command&lt;/P&gt;</description>
      <pubDate>Mon, 17 Aug 2015 15:48:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Column-comparison-for-authentication/m-p/172049#M49322</guid>
      <dc:creator>diogofgm</dc:creator>
      <dc:date>2015-08-17T15:48:58Z</dc:date>
    </item>
  </channel>
</rss>

