Not able to create new account in geth for private ethereum network

+1 vote

I am not able to create new account in geth. Please help me solve this.

geth account new --datadir /home/blockchain/Downloads/privatechain/data

INFO [12-05|14:47:50.445] Maximum peer count                       ETH=25 LES=0 total=25

Your new account is locked with a password. Please give a password. Do not forget this password.

Passphrase:

Repeat passphrase:

Fatal: Failed to create account: mkdir /home/blockchain: permission denied
Dec 6, 2018 in Blockchain by slayer
• 29,350 points
3,498 views
Hello, have you solved it?
Did you run the command as root?
yes I tried and the same problem. I was trying to do that on Ubuntu 18.04 and also OS Mint and problem is exactly the same.
Make sure you don't have another directory with the same name in the path. You cannot create a directory with same names in a single location.

2 answers to this question.

+1 vote

Looks like the account you are trying to run this command from does not has permissions. Tyr running it as root user:

sudo geth account new --datadir /home/blockchain/Downloads/privatechain/data
answered Dec 6, 2018 by Omkar
• 69,210 points
0 votes
try this command

sudo geth --datadir ./ account new

to create node 0.The error is probably because you are not using it as the root user
answered Apr 5, 2020 by anonymous

Related Questions In Blockchain

0 votes
1 answer

Not able to send ethers in private ethereum network

Your account is locked by default due ...READ MORE

answered Jan 9, 2019 in Blockchain by Omkar
• 69,210 points
853 views
0 votes
1 answer

How to get account with ethers by default in ethereum private network?

Have you created an account before allocating ...READ MORE

answered Jan 9, 2019 in Blockchain by Omkar
• 69,210 points
1,485 views
–1 vote
1 answer

How to import an account in private ethereum network?

 When you create a new account, the ...READ MORE

answered Jan 9, 2019 in Blockchain by Omkar
• 69,210 points
1,352 views
–1 vote
1 answer

How to change default account in private ethereum network?

First list the accounts: > eth.accounts NOTE: Even ...READ MORE

answered Jan 10, 2019 in Blockchain by Omkar
• 69,210 points
1,618 views
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
1,663 views
0 votes
1 answer

Hyperledger Sawtooth vs Quorum in concurrency and speed Ask

Summary: Both should provide similar reliability of ...READ MORE

answered Sep 26, 2018 in IoT (Internet of Things) by Upasana
• 8,620 points
1,215 views
0 votes
0 answers

Error: Unexpected token o in JSON at position 1

I have been working with Interacting a ...READ MORE

Mar 6, 2019 in Blockchain by saeedi
• 120 points

edited Mar 6, 2019 by Omkar 2,181 views
–1 vote
1 answer

Not able to create new account in geth for private ethereum blockchain

personal.newAccount() is not a default geth method. This ...READ MORE

answered Jan 17, 2019 in Blockchain by Omkar
• 69,210 points
3,357 views
0 votes
1 answer

Not able to invoke a contract in Ethereum Private chain using geth

Hope this helps: contract mortal { /* ...READ MORE

answered Oct 22, 2018 in Blockchain by Omkar
• 69,210 points
719 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP