How to use ipa-getcert with file injections - linux

I am trying to figure out the best solution for below.
[user]:~>BLAH=$"cat text.txt"
[user]:~>ipa-getcert stop-tracking -i $BLAH
the text.txt document hosts the Request ID of a cert.
However, its not actually putting the info in the command. Is there an IPA command that can find and replace the old certs with out manual Request ID entries?
Or is there another way to inject the ID that is inside the text.txt?

Related

How do I curl a URL with an unknown filename at the end?

I'm talking to a server that creates a new zip file daily, ex: (data-1234.zip). Every day the name of the previous zip is removed and a new one is created with an incremented number, ex: (data-1235.zip). The script will be run sporadically throughout the week but it's on a lab system where the user can't manually update the name with what's on the server.
The server only has one zip file in that directory, it's just a matter of getting the correct naming convention. There is, however a "data.ini" file in the folder as well, so something just searching by first name wouldn't necessarily work. I've seen posts similar to This question using regex but the file is currently on 10,609 and I'd rather not use expansion for potentially thousands of calls depending on access to modify the script in the coming years. I've been searching for something similar to "data-*.zip" but haven't had any luck.
Question was solved by changing commands and running
lftp https://download.companyname.com/product/data/ -e "mget data-*.zip; bye"
since lftp allows wildcards in the filename, unlike curl.

Where to get the domain confirmation string certbot?

I was following this tutorial:
https://flaviocopes.com/express-letsencrypt-ssl/
…and finally we get to the verification phase!
Create a file containing just this data:
TS_oZ2-ji23jrio3j2irj3iroj_U51u1o0x7rrDY2E.1DzOo_voCOsrpddP_2kpoek2opeko2pke-UAPb21sW1c
And make it available on your web server at this URL:
Where do I get this long string mentioned there? I didn't copy it when I made the certs with certbot but now I need to confirm my domain with such string. Where is it located?
The string is the output of the process described in the link. It will change every single time you go through this process.
You need to copy it from the command line and create a file containing that (and only that) string.
If you didn't copy it, you need to start the process again and get a new string.

Weblogic 12c change domain name

Does anyone know what is the correct way to change domain name in WLS 12c?
After changed domain name i have this error:
<2015-03-03 15:51:55 CET> <Critical> <JTA> <BEA-110482> <A logging last resource (LLR) failed during initialization. The server cannot boot unless all configured LLRs initialize. Failing reason:
javax.transaction.SystemException: Failed to call > registerLoggingResourceTransactions() weblogic.transaction.loggingresource.LoggingResourceException: weblogic.transaction.loggingresource.LoggingResourceException: java.sql.SQLException: JDBC LLR, table verify failed for table >'CS_CMS.WL_LLR_MYSERVER', row 'JDBC LLR Domain//Server' record had unexpected value 'aaa//myserver' expected 'bbb//myserver'* ONLY the original domain and server that creates an LLR table may access it *
Could anyone tell how can I fix this issue?
Renaming a weblogic domain is not as simple as renaming a folder, check the following:
Tons of files within your domain folder are going to reference the domain name, do a grep -r your_domain * and you will see where it's referenced. You can exclude tmp, cache, etc. like --exclude-dir={tmp,logs,cache}
After looking at the above, you can do something like xargs sed –I ‘s/your_domain/new_domain/g’ on all the files containing the old name
Last, in regards to the error you're seeing, Weblogic keeps a LLR table with a single row that includes the path to the domain. Update that table with the new/path (see the Oracle link below)
See this Oracle doc with regards to that table
See this example on changing the domain name. Note this example does not include modifying the LLR table.

How to add entries with slapadd in openldap replication(synrepl)

We have openldap replication with syncrepl, I don't know how to add slapadd entries into it.
On standalone it works fine. but when i add entries in one of the machine in replication, second machines fails to start slapd.
Thanks
Unfortunately slapadd doesn't write to the accesslog and thus the modifications aren't replicable. This is especially bad, because some attributes can't be modified via ldapadd.
If you only need ordinary attributes, use ldapadd instead.
UPDATE:
It looks like you can use the -w switch:
Write syncrepl context information. After all entries are added, the
contextCSN will be updated with the greatest CSN in the database.

Linux: WGET - scheme missing using -i option

I am trying to download multiple files from yahoo finance using wget.
To do that i used a python script to generate a text file with all urls that i need.
When downloading a single file (a csv file) using the following code:
wget ichart.finance.yahoo.com/table.csv?s=BIOM3.SA&a=00&b=5&c=1900&d=04&e=21&f=2013&g=d&ignore=.csv
everything goes OK!
However, when the option -i is added and instead of reading the url directly, but instead reading it from the file, i get the error:
Invalid URL ichart.finance.yahoo.com/table.csv?s=BIOM3.SA&a=00&b=5&c=1900&d=04&e=21&f=2013&g=d&ignore=.csv: Scheme missing
The file that contains the urls is a text file with a single url in each line. The urls are exactly like the one in the first example, but with some different parameters.
Is there a way to correct this?
Thanks a lot for reading!!
To solve the problem I added double-quotes on the links and a web protocol. For example:
"http://ichart.finance.yahoo.com/table.csv?s=BIOM3.SA&a=00&b=5&c=1900&d=04&e=21&f=2013&g=d&ignore=.csv"

Resources