unique x500 object id creation - active-directory

I am trying to create a unique x500 object id for active directory to extend the schema.
I have been allocated a PEN as per here.
This number is only 5 digits longs. All the examples I have seen the OID is a lot longer. IE 1.2.840.113556.1.8000.999999
Any links or directions on this would be great.

For anyone else that was slightly lost with this, this is what I have found out.
I was missing the 1.3.6.1.4.1 at the beginning which is global as per the original link in the question.
My OID ended up being 1.3.6.1.4.1.52051.10000.1.1.1

Related

Show UniData SELECT results that are not record keys

I'm looking over some UniData fields for distinct values but I'm hoping to find a simpler way of doing it. The values aren't keys to anything so right now I'm selecting the records I'm interested in and selecting the data I need with SAVING UNIQUE. The problem is, in order to see what I have all I know to do is save it out to a savedlist and then read through the savedlist file I created.
Is there a way to see the contents of a select without running it against a file?
If you are just wanted to visually look over the data, use LIST instead of SELECT.
The general syntax of the command is something like:
LIST filename WITH [criteria] [sort] [attributes | ALL]
So let's say you have a table called questions and want to look over all the author for questions that used the tag unidata. Your query might look something like:
LIST questions WITH tag = "unidata" BY author author
Note: The second author isn't a mistake, it's the start of the list of attributes you want displayed - in this case just author, but you might want the record id as well, so you could do #ID author instead. Or just do ALL to display everything in each record.
I did BY author here as it will make spotting uniques easier, but you can also use other query features like BREAK.ON to help here as well.
I don't know why I didn't think of it at the time but I basically needed something like SQL's DISTINCT statement since I just needed to view the unique values. Replicating DISTINCT in UniData is explained here, https://forum.precisonline.com/index.php?topic=318.0.
The trick is to sort on the values using BY, get a single unique value of each using BREAK-ON, and then suppress everything except those unique values using DET-SUP.
LIST BUILDINGS BY CITY BREAK-ON CITY DET-SUP
CITY.............
Albuquerque
Arlington
Ashland
Clinton
Franklin
Greenville
Madison
Milton
Springfield
Washington

Laravel show records as flat array or single record

I have 2 column in my table setting
with the following values
KEY VALUE
company ABC
phone 14344
address Somerset City
I need to display this like a single record or a flatten
array in the view/blade page
something like
{{$sett->company}}
{{$sett->phone}}
or an array with lookup
{{$myarray('company')}}
{{$myarray('phone')}}
The idea is if I add another settings like contact us email address
for my website I don't want to add another column.
I know this is achievable in controller by creating different variable
and executing different query but I'm kind of looking for some options here.
Thanks for the help really appreciated.
You can use $settings->pluck('value', 'key') to get your result. Read more here: https://laravel.com/docs/5.4/collections#method-pluck

Take the qualifiers - postgresql

I'm working on the postgresql 8.4 source code. I need to extrapolate the qualifiers (where part) from the query.
For example if the query is: select name from student where age > 18
I need to know "age" and "18".
I've already took the target list, and the range list in this way
Query *query_idr = (Query *)linitial(querytree_list);
ListCell *l;
ListCell *tl;
foreach(l, query_idr->rtable){
Oid tab_idT = ((RangeTblEntry *) lfirst(l)) ->relid;
}
foreach(tl, query_idr->targetList){
TargetEntry *tle = (TargetEntry *) lfirst(tl);
Oid col_id = tle->resorigtbl;
}
and it works, and I've got the id of the table student (with the first foreach) and id of name column (with the second foreach), but I can't understand how I have to take the qualifier.
Here is the navigable Query structure http://doxygen.postgresql.org/structQuery.html
I doubt you are going to get an answer here. In general hacking the PostgreSQL source code is not likely to have enough people here who can answer it that a general site like this will be helpful. However rather than leave this withough any such resources I would like to reply to provide a list of resources for answering questions like this one as well as my reading of the docs as someone with quite a bit of experience buildign things on Pg.
In essence what you are trying to do is navigate through the parse tree of the query. It looks to me like the setOperations member might be the place to look just because I can't think of anywhere else and because this might help with both join conditions and where clause filters (remember these are considered interchangeable by the planner). However I have little experience in this area and so I could be wrong.
I would entirely second the suggestion that the pgsql-hackers list is likely to be the best place to ask this sort of question. You will probably get a better answer there.

Getting all members of a group and its subgroups

I have groups as such:
GroupA
GroupB
Users
GroupG
Users
So the goal is to get all users that are members of parent group GroupA.
I have the following filter:
(&(objectCategory=Person)(objectClass=User)(mail=*MyEmailDomain.com)(memberOf=CN=GroupB,OU=MyOU3,OU=MyOU2,OU=MyOU1,DC=MyDomain,DC=LOCAL))
Which works for the lowest level groups.
From research, it seems that this should work, but doesn't:
(&(objectCategory=Person)(objectClass=User)(mail=*MyEmailDomain.com)(memberof:1.2.840.113556.1.4.1941:=(CN=GroupA,OU=MyOU3,OU=MyOU2,OU=MyOU1,DC=MyDomain,DC=LOCAL)))
If it matters, I'm using Active Directory Explorer to get the Distinguished Names, and the LDAP Input step in Pentaho's Data Integration tool (Kettle/PDI) to retrieve the data.
I love the fact that I always find the answer to my questions as soon as I post them somewhere. I need to learn to post much earlier and maybe I will spend less time searching :)
Found a random stackoverflow post that indicated there's an error in the msdn article for this and it has too many parenthesis.
This won't work:
(&(objectCategory=Person)(objectClass=User)(mail=*MyEmailDomain.com)(memberof:1.2.840.113556.1.4.1941:=(CN=GroupA,OU=MyOU3,OU=MyOU2,OU=MyOU1,DC=MyDomain,DC=LOCAL)))
But this DOES work:
(&(objectCategory=Person)(objectClass=User)(mail=*MyEmailDomain.com)(memberof:1.2.840.113556.1.4.1941:=CN=GroupA,OU=MyOU3,OU=MyOU2,OU=MyOU1,DC=MyDomain,DC=LOCAL))
(no parenthesis around the Distinguished Name)
Hi This does not fetch the users recursively. This is just giving the list of users of parent group only.
(&(objectCategory=Person)(objectClass=User)(mail=*MyEmailDomain.com)(memberof:1.2.840.113556.1.4.1941:=CN=GroupA,OU=MyOU3,OU=MyOU2,OU=MyOU1,DC=MyDomain,DC=LOCAL))

Rename field using Objectify and Google App Engine

I am trying a case where we changed a field name in our entity. we have something like this for example
class Person {
String name; //The original declaration was "String fullName"
}
According to objectify you have to use annonation #AutoLoad(""). This is ok and it works as Google Datastore doesn't delete the data Actually but it makes a new field so this annotation is like a mapping between the old and the new field. No problem when you are reading the whole table.
The problem arises when you apply a filter on your query (Suppose you made 5 objects with old name and 5 with new name). The result of your query depends on whether you used the old variable name or the new one (returns back only 5 but never the 10). It won't fetch both of them and map them. Any Suggestions for this problem? I hope i explained it in a clear way.
Thanks in advance
The simplest straight forward solution. fetch all data with the annonation "AutoLoad()". Then store them again. In this way they will be saved as the new field. The old one doesn't exist anymore or at least it doesn't contain any data anymore. It is like migrating the data from the old name to the new name. Anyone has better suggestions ?
If you've changed the name of your field, you need to load and re-put all your data (using the mapreduce API would be one option here). There's no magic way around this - the data you've stored exists with two different names on disk.
You can use #OldName
http://www.mail-archive.com/google-appengine-java#googlegroups.com/msg05586.html

Resources