• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Exporting my key as a PEM file

Greum

Well-Known Member
I'm trying to reset my upload key. Google's instructions say:

2. Export the certificate for that key to PEM format:

keytool -export -rfc -alias upload -file upload_certificate.pem -keystore keystore.jks

After several attempts I have managed to locate keytool.exe and I changed the command to use my .jks file. Having eventually got the password correct I now get the following error:

keytool error: java.io.FileNotFoundException: upload_certificate.pem (Access is denied)

Can anyone help please? I am running out of hair to tear out!
 
run it as sudo
sudo keytool -export -rfc -alias upload -file upload_certificate.pem -keystore keystore.jks

or

move the pem file to the Desktop
keytool -export -rfc -alias upload -file ~/Desktop/upload_certificate.pem -keystore keystore.jks


I assume you are using Linux
 
I'm on Windows 10.

Edit: I wondered whether the message indicated I should run the command as administrator but I'm not sure how I do that on Windows.
 
Last edited:
Ah, well. That's another story. I was going to install Mint as dual boot, but haven't found a way to get round Windows' UEFI/secure boot.

Ooh that's easy.

1. Boot Mint installation media
2. Choose clean install
3. Reformat entire HDD
4. Install Mint

Job done! Ta-da!

:p
 
Lol. Thing is I'm not quite ready to go all the way. I need a dual boot, just in case...
@LV426 is 100% correct: I agree! Switch to Linux. :)

If you want to share your concerns with us, perhaps we can help put your mind at ease.

For example, if you're among the many who think Linux means doing everything with cryptic commands at a command line, we can assure you that it's not. That, in fact, if you don't WANT to, you need never even SEE a command prompt. My mother happily used Kubuntu Linux for years, up until her death, and never saw a command line. She had known nothing but windows prior to my switching her, and her only complaint about Linux was, "it's too fast!" :D

What do you think you'll lose by switching?
 
The only reason I'd duel boot with windows is if I had some high-end games that will only run on windows. I definitely prefer Linux Debian 9 Stretch over windows for developing software. High-end Apple computers are also good. Apple is too rich for my budget though so I stick to open source and I'm just as productive with a $700.00 PC than a $1200.00 Apple computer.
 
What do you think you'll lose by switching?

I suspect it's a question of application availability/compatibility. And in a corporate environment, there's usually a forced policy of Windows, and most places use MS Exchange etc.
 
I'm happy using Linux but I can't afford to wipe everything and install Mint (or whatever) as I would be without a working machine for too long. There are just too many programs to re-install, and I have some programs that are not available for Linux. Many of my programs are available for Linux, or there's a replacement, but not all.

As I say my ideal would be a dual boot system.
 
As I say my ideal would be a dual boot system.

I'm pretty sure that the UEFI/secure boot issue can be cracked, and there's a way to install both. Let's do some Googling around and see if we can get you sorted.
Are you stuck on using Mint, or open to other distros? I use Ubuntu, and I it's brilliant. Very easy to use.
 
I would be without a working machine for too long.
Got a spare weekend? Some time when you can do your thing without feeling rushed?

For me, it takes ≈30 minutes to install Kubuntu on a new machine. Then there's the considerable time I CHOOSE to spend setting up and tweaking its infinite customization options.
There are just too many programs to re-install
Are you familiar with Synaptic? It's the package manager I use. It has...well, I don't rightly know how many thousands of programs it has--and more you can add from other repositories--so let's just say it has A LOT. And there's nothing to do to install them other than checking off the program(s) you want, and clicking 'apply.' Set it to install 10, 50, 100 whatever programs and go grab yourself a cup of coffee or something. :)
and I have some programs that are not available for Linux. Many of my programs are available for Linux, or there's a replacement, but not all.
There's always the venerable wine, and I believe others, that let you run windows programs. I read an interesting article about that concept, but it's focused on windows-only games. It's worth a read, especially if you're a gamer.

But if you're set on dual-booting, I'm sure that can be done, although I can't help you. The last time I set up a dual-boot box was ≈1994. We have a Linux mega-thread where you're welcome to participate. Feel free to ask anything and someone will likely be able to help.
 
Be sure to go into /etc/shadow and remove the last character next to root to disable root when you aren't using it otherwise your box will be hacked in 2 seconds flat......but make sure the user you are using is part of the sudo group
 
Be sure to go into /etc/shadow and remove the last character next to root to disable root when you aren't using it otherwise your box will be hacked in 2 seconds flat.
34 years of using *nix and I did not know that! ;)

Nor have I ever disabled root.

Nor have I ever been hacked. :)

A properly-configured Linux box should keep intruders out. At least, that's what's worked for me both at home and work.
 
Oh goodness moody please disable root as I've described it's an easy and standard way of securing root because the hacker knows every Linux box has the username root so all they have to do is crack root password but if you have it disabled then they have to guess both username and password.
 
BTW we aren't getting rid of root root is still needed it's just not used very often so why have it's password enabled. It works like a charm
 
Brian I don't fully understand what the issue is. When you install a Linux distro, it prompts you for a root password, which should of course be a strong one. Using a weak password can make your system vulnerable. But that's true for any user.

On my Ubuntu system nobody can directly log in as root user. And to become root, you need to be able to use sudo, which has to be purposely enabled for any user.
 
Last edited by a moderator:
That may be true for Ubuntu and other distros.Im using Debian 9. Strong passwords is a solution. I'm just describing one of many solutions that I consider bullet proof
 
Thanks, Brian, but no thanks. :)

I not only don't disable root, I set up all my computers to allow root log-ons. And I allow su - which I use frequently.

My passwords are strong, from the ground up, i.e., starting with my router.

Please don't think your suggestions are bad or anything like that. It's just that I've used *nix since 1985--with ZERO security problems, and off-site backups--and kind of know what I'm doing. :D
 
If it gives you more peace of mind that disabling root is making your system safer that's a good thing but, just my opinion, that seems to be more folly than practical. Please provide some documentation from valid sources that confirm your claim that Linux installs with root accounts enabled get readily hacked in two seconds.
With the non-stop parade of breaches and compromises to almost any online service popping up almost daily, I have yet to see root-access enabled Linux systems being a factor to that problem -- most being attributed to users not updating their systems properly (disabling root as a policy will only make that issue even worse.)
 
Please provide some documentation from valid sources that confirm your claim that Linux installs with root accounts enabled get readily hacked in two seconds.
Yes! All of my computers, which are all root-enabled, are billions of seconds past 2...but they're still not hacked...
 
Back
Top Bottom