ubuntu – SSH key only works after password has been previously entered

On first login, I get the public key denied.

mac@DarkNet3:/opt/MalwareArchive/APKs$ ssh mac@
mac@ Permission denied (publickey,password).

Then I login with my password, and when I close the session and reopen, I can get in with the SSH key on subsequent login attempts.

% ssh mac@dnet
mac@dnet's password:

Subsequent logins will work for a few hours, then if I try to login again, it will ask me for the password again.

I believe my .ssh folder is setup correctly.

mac@DarkNetLab:~/.ssh$ ls -lah
total 76K
drwx------  2 mac mac 4.0K Jan  8  2018 .
drwx------ 69 mac mac  20K Nov 12 12:54 ..
-rw-------  1 mac mac 1.6K Jan  8  2018 authorized_keys
-rw-------  1 mac mac 1.7K Dec 12  2016 id_rsa
-rw-------  1 mac mac  396 Dec 12  2016 id_rsa.pub
-rw-------  1 mac mac 4.2K Nov 11 21:09 known_hosts

How to check title is being entered in Title Case?

I would like to ensure that my titles are entered in Title Case. I would prefer to do this from the editor, before it is saved to the database, rather than altering what is displayed, or modifying existing titles.

mysql – How to increase price by 20% when value entered in SQL is VARCHAR

I am trying to increase the price of all items that are monitors by 20% but the current line is VARCHAR so when I try to increase by 20% I get the following error:

Msg 8114, Level 16, State 5, Line 1
Error converting data type varchar to numeric.

This was my data that I entered following steps on another post here

update Product
set ProdPrice = ‘price * 1.2’
where ProdName like ‘%monitor%’

Here is what the full table looks like:
enter image description here

google sheets – Query Function – remove parts of entered term and carry out formula

I’m sorry if the title is confusing.
In the List to Search tab, I’ve got a bunch of orders. What I do is select the dishes in a single cell in this manner:

enter image description here

And I want to just dump them into the column A, dishes search section in Search for Dish tab. And the query should grab the relevant dishes from the Inventory tab, omitting the numbers before the dish name, i.e. “1_” or “1___”. Basically just omit that part and only get the dish name without me having to do any extra work.

The numbers before the dishes would be in either of these 2 patterns mostly, “1_” or “1___”.

If this detail helps, all dishes have an index number in this format D00 - or D000 -

This is the basic routine for my work, the copying of dishes from a single cell, so its important that I be able to just grab only the dish name with index number.

This is my spreadsheet https://docs.google.com/spreadsheets/d/1rlATwRPTkofEg0rB5-GSwwBpQDa7ZOoeNvhs0xPOsKA/edit#gid=719800634

I’ve tried INDIRECT & TRIM in the query formula like this: "where A='"&INDIRECT(A3)&", but they didn’t work. Maybe the way I entered them were wrong.

I hope this is possible.
Thank you guys in advance 🙂

air travel – For UK/USA bound flights, are details entered during online check-in, such as date of birth or passport number ever checked by airlines/immigration?

Is passenger information (as entered during online check-in) other than name and visa ever validated by airlines?

For US/UK flights the information you entered during online check-in seem to be always thrown away. What seem to happen in practice nowadays is that your passport is always scanned/swiped during the “document check” (which happens either during check-in, or at the gate) and the information you have entered during online checkin is overwritten. The gate agent explained it was faster for them to do it this way than cross-check the data and correct mistakes. You can watch it yourself when they do it.

Is that information ever validated by immigration?

It depends on how you define “validated” (I assume we’re mostly concerned about the practical aspect, i.e. “what happens if the airline transmitted the incorrect information I entered, and it doesn’t match my documents?)”. However some of us routinely travel with two passports, and usually the information from only one of them is transmitted. For example, I routinely fly to Istanbul showing only the US passport to the airline, but enter Turkey using a different passport (which the airline knows nothing about) – never had any issues.

Even if they did, you can’t be blamed for this because you did not transmit this information to immigration yourself. More, the law puts this responsibility (and liability) on airlines, not on you. If they let the inaccurate information through, it is their fault – and their fine.

Update: last month I have requested (FOIA) the CBP arrival records for my Mom, and they had inaccuracies. In one case she missed the flight and took a later flight 7 days late, but CBP had record of her arrival in USA on the date of the missed flight – and this arrival was NOT recorded in CBP database. Thus it is pretty evident that this information is not checked at least by US immigration.

Will you be denied on-board because you’ve made a mistake during

Every time I get a new passport, when I do online checkin, I typically make mistakes in passport number and the expiration day. It has never been a problem, and I was never denied boarding. This included multiple flights to USA/UK.

Final: since the data you entered during online checkin is always overwritten during the document check, it is impossible to be denied boarding for the mistakes/typos made during online checkin*. Even if for some reason the airline decides to verify it, they would simply enter the correct the data and let you through. As mentioned in previous version of this answer, I have done this in 2016, and I have done it a lot in 2017 (being pissed off that airline requires you to enter a shitload of data which they throw away anyway).

(*) of course you can still be denied boarding for other reasons, like bringing a wrong passport. But this was not the scope of the questions.

How to auto populate city and state on checkout page while entered the pincode in magento 2?

Hello Folks,
I am new in Magento 2, I am adding some custum code for changes on checkout page to auto populate the city and state while entered the pincode.

Can you help me which js file should I change to override the data.

I accidentally entered my date of birth wrong [closed]

I accidentally entered my date of birth wrong and have no idea how to fix it

8 – Webform Validation – adding validation on a date field to be not greater than another date field entered in the same submission

Drupal 8 webforms
We have a procurement completion date and build completion date. Build completion cannot be earlier than procurement completion naturally.

I tried setting this up by adding the min date validation for build completion using the token below:

This gave me an error stating the field is recursively being called and it broke the webform.

Is using webform submission values token on the form being filled possible or am I going about this wrong?

sql server – Data that are sometimes entered and sometimes computed

Suppose I have a database of StorageComplex objects. StorageComplex has a guid Id, plus two data columns: Capacity (a number), and Location (a string).

My data also contain a table of StorageTank objects. A StorageTank also has an Id, Capacity and a Location. Application code should treat a collection of StorageTanks at the same Location as an aggregated StorageFacility. The Capacity is the sum of the capacities of the individual StorageTanks.

It is guaranteed that there will never be a StorageTank at a location that also has a non-aggregated StorageFacility.

If it’s relevant, the applications in question access the database via EntityFramework.

My question is about the advantages and disadvantages of different strategies to manage this situation. One could imagine maintaining aggregated StorageFacility objects in the StorageFacility table. Whenever a StorageTank at a location is added, updated, or deleted, one would have to apply a corresponding change to the aggregated StorageFacility at that location. Alternatively, one could imagine not maintaining such entries. Then every query for StorageFacilities would also need to check the StorageTank table.

In the real-life applications, everything is more complicated than in this toy example. There are a lot of fields that have to match in order for StorageTanks be aggregated together, there are multiple fields that need to be aggregated, and the rules for the actual aggregation are more complicated than just adding up some numbers. The StorageTanks have fields that StorageFacilities lack. Additionally, there are a lot of different queries that access the StorageFacilities. For some purposes, an aggregated StorageFacility should be treated the same as a non-aggregated one. For other purposes, they are different.

disk encryption – Entered FDE password in GRUB by mistake

For several reasons (I have an external monitor, etc.) when I booted the laptop I typed the FDE (Full Disk Encryption on Linux, LUKS) without looking at the monitor, and I ended up typing the full password and hitting enter before the FDE prompt was available. This means that when I looked at the monitor, I saw something like:

'second-part-of-my-FDE-passprhase' and some message about GRUB not recognizing something.
GRUB> _ (This is a GRUB prompt, I think there was a GRUB prompt here)

That’s all. So I hit ESC, and I went back to the list of available options / OSs to boot. Then I followed the usual procedure, as I always do: I selected my Linux OS as usual, saw the FDE password prompt, typed the password, everything was ok.

Now the question is: has my password been leaked somewhere? Was that a security blunder? What I’ve done is just go to /var/log and try ‘sudo grep -Eir –color ‘fraction-of-a-word-in-my-passphrase’`, a couple of times for a fraction at the beginning and one at the end of the passphrase, and I found nothing related (although I might have missed something in case it ended up in “binary file foo matches”, like in gz archives). By the way, these greps ended up in auth.log, and I later removed those lines.

Then I thought that it’s probably useless to check if something has ended up on the disk, because at the time of the “blunder” it was encrypted to begin with. Also, even if something was written later, it will still end up being encrypted at rest (which is what FDE protects against). So leaking the FDE password in clear text inside a FDE disk is probably not a security issue. I think there is a partition that is not encrypted anyway, which should be /boot, which is apparently where anything before FDE lives (including GRUB). So I tried grepping pieces of words inside /boot too, and found nothing interesting (some binary files match, but I doubt my passphrases ended up inside a vmlinuz executable, you know).

So finally, did I miss anything? Should I check anything else? Should I stop being paranoid and forget about it? Should I change password? But you know, changing a long passphrase that you have finally learned by heart so well, is such a huge pain.