How to make a ldap query to see if 'Identity Management for UNIX' is installed - unix

I wanted to find out if unix attributes module is installed in AD. One way I could think of is to query for a OID of the schema for unix (for e.g unixHomeDirectory 1.3.1.1.1.1.3). Wanted to know if this is the way to go and how to make such a query.
Thanks
-Aditya

As updated in the comment was able to get the info.

Related

Automatic MariaDB table replication between 2 databases on the same server

So a friend of mine asked me to help him configure an automatic replication of a table on his MariaDB database to another table that's supposed to be an exact copy of the source/primary table.
The databases are on the same server. MariaDB version 10.2.44. The databases are on a cPanel managed webserver run by a webhost. We are accessing the databases using HeidiSQL, which is what I'm hoping I can use to configure everything.
Upon lots of googling, this is the article I suspect makes the most sense for what we want to do, but it doesn't look like this is automatic to any extent: https://mariadb.com/kb/en/setting-up-replication/
Is this the best way to do what we're trying to do? Is there a better way? Any suggestions?
Thanks!
Like #ysth said, in this case, triggers can be used.
When creating a trigger that "works between different databases", you need to specify the database on the trigger name. So for example:
CREATE TRIGGER database_name.trigger_name
Otherwise you'll get an "Out of schema" error.
The database you need to specify is the one where the "listener" is located. Basically, the place where the condition for the trigger is being checked.

sqlite database location node-red

I have a Node-RED flow. It uses a sqlite node. I am using node-red-node-sqlite. My OS is Windows 10.
My sql database is configured just with name "db" :
My question is, where is located the sqlite database file?
I already search in the following places, but didn't found:
C:\Users\user\AppData\Roaming\npm\node_modules\node-red
C:\Users\user\.node-red
Thanks in advance.
Edit
I am also using pm2 with pm2-windows-service to start Node-RED.
If you don't specify a full path to the file in the Database field it will create the file in the current working directory for the process, which will be where you ran either node-red or npm start.
Use full path location with file name.
It should work i guess.
This isn't a valid answer, just a workaround for those who have the same problem.
I could't find my database file. But inside Node-RED everything worked just great. So. this is what I have done as a workaround:
In Node-RED, make some select nodes to get all data from tables
Store the tables values somewhere (in a .txt file or something like that)
Create your database outside Node-RED, somewhere like c:\sqlite\db.db. Check read/write permissions
Create the tables and insert the values stored from old database
In Node-RED, inside "Database", put the complete path of the database. For example, c:\sqlite\db.db
In my case this was easy because I only had two database with less than 10 rows.
Hope this can help others.
Anyway, still waiting for a valid answer :)

Search for the node just created Alfresco JAVA

In one requirement I need to query just created document. If I use lucene search then it will take few seconds to do the indexing and may not come in the search result.
The query should be executing from some alfresco webscript or a scheduler which runs every 5 seconds.
Right now I am doing it by using NodeService and finding child by name which is not the efficient way to do. I am using JAVA API.
Is there any other way to do it?
Thank you
You don't mention what version of Alfresco you are using, but it looks like you are using Solr.
If you just created the document, the recommendation is to keep the reference to it, so you don't have to search for it again.
However, sometimes it is not possible to have the document reference. For example, client1 is not aware that client2 just created a document. If you are using Alfresco version 4.2 or later, you can probably enable Transactional Metadata Queries (TMQ), which allows you to perform searches against the database, so there is no Solr latency. Please review the whole section, because you need to comply with four conditions to use TMQ:
Enable the TMQ patch, so the nodes properties tables get indexed in the database.
Enable searches using the database, whenever possible (TRANSACTION_IF_POSSIBLE).
Make sure that you use the correct query language (CMIS, AFTS, db-lucene, etc.)
Your query must be supported by TMQ.

DynamoDB client in local with UI like PHPMyAdmin

I am creating web service in zend framework which uses DynamoDB. So I installed DynamoDB in local. But it's not easy to use. Even for inserting data and update any data for testing for purpose I have to write a script.
Is there any DynamoDB client available for MAC ? In which we can insert/update/delete data from UI.
EDIT
Doubts
1) Do I have to run a SQL to see table data? I thought there would be GUI for this.
2) I am not able to use where clause in SQL. What if I want to see one or two records from all? Is there a way to use conditions in this?
3) All fields of a row is not visible and I am not able to scroll it horizontally ?
YES! I've finally found a solution after struggling with this myself:
Run your local dynamodb jar with the following command java -jar DynamoDBLocal.jar -dbPath . [this will create a file in whatever directory the Dynamo jar is located in].
Download SQLite Database Browser and extract/install it.
Start SQLite Database Browser
Navigate to "Open Database" from the file menu
Navigate to the directory from 1. Select the file [in this case, ****_us-east-1]
You should then see the database contents!!
Hope this helps - it's been frustrating me no end!
!! EDIT !! - in response to original question edit.
Doubts
1) Do I have to run a SQL to see table data? I thought there would be
GUI for this.
2) I am not able to use where clause in SQL. What if I want to see one
or two records from all? Is there a way to use conditions in this?
3) All fields of a row is not visible and I am not able to scroll it
horizontally ?
Yes - you can do a simple "select" statement, for instance in my examples: "SELECT * FROM tweet_item" returns me the following screenshot:
Seemingly inadvertanyl - whilst I couldn't get the direct SELECT * FROM XX WHERE XX to work, the like statement does. For instance SELECT * FROM tweet_item where tweet_item.hashKey like "%425665354447462400%" returns me the tweet with tweet_id [my hashKey] of 425665354447462400:
Strange - I seem to be able to scroll quite happily [although it is Windows not Mac]. It also automatically tries to re-size the outer frame, too.
I ran into this problem and found a relatively new solution : https://github.com/aaronshaf/dynamodb-admin
It has provision for GET/POST/PUT/DELETE.
Although its a paid product, which is a bummer, RazorSQL now supports DynamoDB as well, and does let you change the AWS endpoint to point to a local installation.
The mac version (with a free trial) is available here:
http://razorsql.com/download_mac.html
Here is a very useful ui tool https://github.com/YoyaTeam/dynamodb-manager,It supports almost all data operations。
For Eclipse users:
Amazon provides AWS Toolkit for Eclipse IDE. It can view local and cloud databases. Also if you are using different regions, it has ability to choose from different regions.
You can create attributes, add keys etc..
For installation follow this link: http://docs.aws.amazon.com/toolkit-for-eclipse/v1/user-guide/getting-started.html
Dynobase is new DynamoDB GUI Client which also lets you browse and manipulate local DynamoDB instances: https://dynobase.dev/dynamodb-local-admin-gui/
Unfortunately, it's paid but there's free 7-days trial, works on Mac, Windows and Linux: https://dynobase.dev/

I need an alternative for PHP data storage (simular to MySQL and SQLite DB's)

I'm working on a WordPress theme that includes a subscribe form which doesn't work correctly at the moment because i can't figure out where to store the user's info.
I cannot use MySQL because of the target market host's security. I cannot use SQLite because I cannot pre-install it into the theme and I'd like to make it as easy for the user as possible (already setup) so the last thing id want to ask them to do is setup a SQLite database.
I know there are other ways to store info, like in .txt files, but i need something that will work like a database. Something that can update certain fields in certain rows etc etc.
Any ideas guys?
Thanks!
How are you planning to get WordPress running without MySQL? It's not like it will run on any random database — as stated on WordPress.org:
Currently, the only database supported by WordPress is MySQL version 4.1.2 or greater.
If you're wondering how to store information in the database WordPress is already using (which I assume must be MySQL), you should have a look at get_user_meta, add_user_meta, update_user_meta and delete_user_meta.
These functions will store additional information (meta data) alongside a user object within WordPress' database and you won't have to worry about the database at all. Just invoke the functions like any other PHP functions and you should be fine.

Resources