From eec465f44eedf322f5b5cf16dce83932ddc19aca Mon Sep 17 00:00:00 2001 From: jerzybrzoska <51721153+jerzybrzoska@users.noreply.github.com> Date: Tue, 26 Jan 2021 17:01:26 +0100 Subject: [PATCH] node_operations.asciidoc: -m is needed for 'useradd' to work The reader was not asked to create a directory 'bitcoin' on his external drive. `sudo useradd -d /external_drive/bitcoin -s /dev/null bitcoin` will not make `/external_drive/bitcoin` the user's home directory as it can only assign existing directories. `sudo useradd -d /external_drive/bitcoin -s /dev/null bitcoin` cannot make new directories, for this '-m' is needed. --- node_operations.asciidoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/node_operations.asciidoc b/node_operations.asciidoc index 6c71e33..a0ab736 100644 --- a/node_operations.asciidoc +++ b/node_operations.asciidoc @@ -277,10 +277,10 @@ In addition, if you have connected an external drive, you will need to tell the On most Linux systems you can create a new user with the +useradd+ command, like this: ---- -$ sudo useradd -d /external_drive/bitcoin -s /dev/null bitcoin +$ sudo useradd -m -d /external_drive/bitcoin -s /dev/null bitcoin ---- -The +d+ flag assigns the user's home directory. In this case, we put it on the external drive. The +s+ flag assigns the user's interactive shell. In this case we set it to +/dev/null+ to disable interactive shell use. The last argument is the new user's username +bitcoin+. +The +m+ and +d+ flags create the user's home directory as specified by /external_drive/bitcoin in this case. The +s+ flag assigns the user's interactive shell. In this case we set it to +/dev/null+ to disable interactive shell use. The last argument is the new user's username +bitcoin+. ==== Node startup