I know this has been asked before, but I haven't found any working answers yet.
It's really driving me nuts.
I have 3 apps in Google play, all published in 2016/2017 with Eclipse.
What I saved was a binary file (the keyfile I guess) for every project and some 'passwords', one for every project and one for what I saved by the name 'DistributionKeyStoreAlias' (which I used for all three?)
I can't remember how it was in Eclipse, but now in Android studio it seems like the information I have to provide has changed?
I see a 'key store path' (I pointed it to the binary file), the 'key store password' (I entered the password which I saved for the specific project) and the 'key alias' (I guessed it was the 'DistributionKeyStoreAlias' thing) and the 'key password' (I enetered the password I stored for the 'DistributionKeyStoreAlias').
But it fails with the same message, for all 3 apps!
I've tried all combinations, and it's driving me nuts. As it seems now, I can't re-publish any one of them.
You can use the commandline "keytool" to have a look at your keystores.
For example, try:
keytool -v -list -keystore yourbinaryfile.keystore
The error message should tell you what is wrong. If your binary file is not a keystore it should tell you. Otherwise, it should list the aliases of all the keys in your keystore and you can see if what you have written down the alias is, is still correct.
I have a system user on all of my systems that gets a default password; we're using a vendor for this, and we aren't able to remove the password from the initial setup.
We're currently setting the shell to nologin; is there any way with the User module to remove the password?
I could use the shell module to replace the password with !! in the shadow file, but I feel like Ansible probably has a better solution, and I just haven't found it yet.
The last time I looked into this, there was no "good" solution. I do something like this when I need to:
- name: Lock root password
user: name=root password='!'
I try to establish passwords-less communication between mpi of my notes by using some video tutorial. However, at some point what I saw at the screen of the tutorial differ from from what I saw on my screen. As a result I fault to establish needed connection. I guess is that video tutorial missed some steps therefore I didn't get expected result. Let me guide you through the steps.
White screen will be screen of the tutor and black will be mine.
So I successfully establish connection between mpiu of notes I can enter exit ssh ls -la and do other things between my notes and mpiu of the notes. However, each time when I enter to the mpiu the system ask me the passwd so this step I wanna get rid of. For that matter:
I generate RSA key for the rpi0 ( my first note ) and ssh-copy it to the rpi1 ( my second note )
I checked that RSA key located on the both notes for mpiu#rpi1 it will be authorized_key file (as far as i'm understand )
for the mpiu#rpi0 it will be files id_rsa and id_rsa_pub
Now I need to make changes in rpi0 .bashrc file to establish key chain ( here problems begun )
3.1. So I went to home directory, I used vim in order to to edit file
3.2. Here I notice some difference in the file of tutor and mine - the tutor said that in the very end I should add some logic. However, in my file there are two fi , the tutor .bashrc file has only one fi at the end.
3.3. So I added logic after the second fi ( I saw that fi it states from finish => } - so probably it is true end )
3.4. that tutor enter command to apply the changes to the system
3.5. the tutor got this everything ok
but I got this
( take a look at the White-tutor---done-----black---mine-.pdf )
My first thought was I just need to download from the given website ( funtoo.org ) needed program and put it in the needed directory. However, the system deny my copy-past procedure by saying that I I have not rights.
So what should I do ? May be I should install the contain of the zip file to my note ( rpi0 ) by using some Linux command through the terminal ?
[RSA-Check-and-bashrc-files-.pdf][1]
[White-tutor---done-----black---mine-.pdf][2]
Everybody thx for attention. I solved the problem by installing needed programs through the terminal as I thought.
I'm trying to add users to the server running my node application. Right now I am using:
exec("useradd -mp {password-hash}")
with a hash that gets created by
exec("mkpasswd -m des {password}")
This leaves the password visible in the process list, and that should be avoided at all costs.
That's why I am wondering if there is a module on npm or an easier way to add a linux user to the system programmatically (this is necessary because the app I am building creates a user account on the system when a user registers on the web). Can this be done without evoking system commands like I am currently doing? I have found neither npm module nor any information of using node to interact with ubuntu/unix user management.
Solution
Using Mustafa's hints from the top answer, I implemented a version of the mkpasswd command using spawn. In CoffeeScript, it would look like this:
{spawn} = require 'child_process'
child = spawn 'mkpasswd', ['-m','des','--stdin']
child.stdout.on 'data', (data)->
console.log 'password hash arrived: ', data.toString()
child.stdin.write 'password'
Make sure you add the proper error handling event handlers to child.stderr and child.stdout while debugging your code.
You either use those commands or manually add your user to /etc/passwd and its password to /etc/shadow.
Format of a /etc/passwd entry: username:passwd:UID:GID:full_name:directory:shell
Passwd should be x if you want it o make it secure, so it will read from shadow.
Format of a /etc/shadow entry: username:passwd:last:may:must:warn:expire:disable:reserved
If you add them correctly, there will be no problem.
But why would you bother with it manually while you have the required tool? If you are concerned about the privacy, you can issue mkpasswd -m des --stdin which will read the password from standart input. Instead of exec, when you use spawn, you can also control the stdin and stdout of the processes. stdin is just a writable stream, you can write to it and read the output from stdout. Or you can find a npm module that generates the hash with given algorithms, DES, AES etc.
I need to write code that picks up PGP-encrypted files from an FTP location and processes them. The files will be encrypted with my public key (not that I have one yet). Obviously, I need a PGP library that I can use from within Microsoft Access. Can you recommend one that is easy to use?
I'm looking for something that doesn't require a huge amount of PKI knowledge. Ideally, something that will easily generate the one-off private/public key pair, and then have a simple routine for decryption.
A command line solution is good. If your database is an internal application, not to be redistributed, I can recommend Gnu Privacy Guard. This command-line based tool will allow you to do anything that you need to with regard to the OpenPGP standard.
Within Access, you can use the Shell() command in a Macro like this:
Public Sub DecryptFile(ByVal FileName As String)
Dim strCommand As String
strCommand = "C:\Program Files\GNU\GnuPG\gpg.exe " _
& "--batch --passphrase ""My PassPhrase that I used""" & FileName
Shell strCommand, vbNormalFocus
End Sub
This will run the command-line tool to decrypt the file. This syntax uses a plaintext version of your secret passphrase. This is not the most secure solution, but is acceptable if your database is internal and only used by trusted personnel. GnuPG supports other techniques to secure the passphrase.
PGP has a commandline option for decrypting files.
We have a batchfile that does the decryption, passing in the filename to be decrypted:
Batch file:
"C:\Program Files\Network Associates\PGPNT\pgp" +FORCE %1 -z *password*
We than call that from a VBS:
Command = "decrypt.bat """ & FolderName & FileName & """"
'Executes the command script.
Set objShell = WScript.CreateObject ("WSCript.shell")
Command = "cmd /c " & Command
objShell.run Command, 1, True
Hope that points you in a useful direction.
You can use OpenPGPBlackbox (ActiveX edition) for this
Stu... I once had to write a "Secure SMTP" server in Java... The easiest, and quickest way to do this is to download and/or purchase PGP. They have an SDK that you can use to access in anything you want.
I'd have to go back and see if I had to write a COM wrapper, or if they already had one. (I wrote this SMTP server about 10 years ago). Anyways, don't get discouraged. About 5 years ago, I wrote an entire PGP based application (based on the openPGP RFC) in C++, but the catch was, I was NOT allowed to use any existing libraries. So I had to write all that stuff myself. And, I used GPG, OpenPGP, and PGP for testing, etc....
So, I could even provide help for you on how to decode this stuff in VBA. It's not impossible, (it may be slow as hell, but not impossible), and I'm NOT one to "shell out and run cmdline stuff to do work like this for you, as it will open you up to some SERIOUS security risks, as hurcane's suggestion (for example) will cause your passphrase to be displayed to tools like ProcExp). The first step is learning how PKE works, etc. Then, the steps you need to do to get what you want.
This is something I'd be interested in helping with since I'm always one to write code that everyone says can't be done. :) Plus, I own the source code of the app I wrote, because of of mergers, closures, etc...
It was originally written for the Oil and Gas industry, so I know it's secure. That's not to say I don't have ANY security flaws in the code, but I think it's stable. I know I have an issue with my Chinese Remainder Threory code.. For some reason when I use that short-cut, I can't decode the data correctly, but if I use the RSA "long way" it works...
Now, this application was never fully finished, so I don't support things like DSA Key-pairs, but I do support RSA key pairs, with SHA1, MD5, using IDEA, AES, (I THINK my 3DES code does not work correctly, but I may have fixed that since). I didn't implement compression yet, etc... But, I'd love a reason to go back and work on this code again.
I /COULD/ make you a COM object that you could call from VBA passing the original Base64 data in, along with the Base64 key data, (or a pointer to a key file on disk), and a passpsshrase to decode files....
Think about it... Let me know..
Over the years, I have collected vbScript code for doing things like MD5, SHA1, IDEA, and other crypto routines, but I didn't write them. Hell, you could probably just interface with Microsoft's CryptoAPI, and break each action down to it's core parts and still get it to work. (You will not find a Micosoft CryptoAPI call like "DecryptPGP()"... It'd all have to be done in chunks).
Lemme know if I can help.
I would look for a command line encrypter / decrypter and just call the exe from within your Access application, with the right parameters.
There is no PGP encrypter / decrypter in VBA that I know of.
I am not familiar with VBA for Access, but i think that the best solution (perhaps easiest) would be run external command-line PGP utility.
There is a DLL you can call directly from your VBA application without having to span an external program: CryptoCX. PGP has also a DLL you can call.