Skip to content

Commit b788c23

Browse files
committed
README: unify command line instructions
Consistently indicate whether the command requires super-user permission by prefixing commands with `sudo`. Despite my preference for the conventional use of the pseuod-prompts (`$` and `#`) I think they should be removed, as they end up in the way for those users who like to copy-paste commands to their terminals. Moreover, Github seems to interpret the latter as shell comment, and renders `#`-prefixed lines as comments. `apt install` instructions are broken on multiple lines, and package names sorted alphabetically.
1 parent 1e4b6d1 commit b788c23

File tree

1 file changed

+45
-21
lines changed

1 file changed

+45
-21
lines changed

README

+45-21
Original file line numberDiff line numberDiff line change
@@ -22,31 +22,31 @@ list is available below.
2222

2323
[source, console]
2424
----
25-
$ sudo apt install libpam-u2f pamu2fcfg
25+
sudo apt install libpam-u2f pamu2fcfg
2626
----
2727

2828
Additionally, Yubico maintains a PPA with up-to-date versions of pam-u2f.
2929

3030
[source, console]
3131
----
32-
$ sudo apt install software-properties-common
33-
$ sudo apt-add-repository ppa:yubico/stable
34-
$ sudo apt update
35-
$ sudo apt install libpam-u2f pamu2fcfg
32+
sudo apt install software-properties-common
33+
sudo apt-add-repository ppa:yubico/stable
34+
sudo apt update
35+
sudo apt install libpam-u2f pamu2fcfg
3636
----
3737

3838
=== Fedora
3939

4040
[source, console]
4141
----
42-
$ sudo dnf install pam-u2f pamu2fcfg
42+
sudo dnf install pam-u2f pamu2fcfg
4343
----
4444

4545
=== macOS
4646

4747
[source, console]
4848
----
49-
$ brew install pam-u2f
49+
brew install pam-u2f
5050
----
5151

5252
[[building]]
@@ -62,16 +62,23 @@ installed using
6262

6363
[source, console]
6464
----
65-
# apt install --no-install-recommends autoconf automake libtool pkg-config \
66-
libfido2-dev libpam-dev libssl-dev
65+
sudo apt install --no-install-recommends \
66+
autoconf \
67+
automake \
68+
libfido2-dev \
69+
libpam-dev \
70+
libssl-dev \
71+
libtool \
72+
pkg-config \
73+
;
6774
----
6875

6976
If you downloaded a tarball, build it as follows.
7077

7178
[source, console]
7279
----
73-
$ ./configure
74-
$ make
80+
./configure
81+
make
7582
----
7683

7784
Once the module is built, copy the file `pam_u2f.so` to the correct
@@ -87,14 +94,14 @@ You may check out the sources using Git with the following command:
8794

8895
[source, console]
8996
----
90-
$ git clone https://github.com/Yubico/pam-u2f.git
97+
git clone https://github.com/Yubico/pam-u2f.git
9198
----
9299

93100
This will create a directory 'pam-u2f'. Enter the directory:
94101

95102
[source, console]
96103
----
97-
$ cd pam-u2f
104+
cd pam-u2f
98105
----
99106

100107
`autoconf`, `automake`, `libtool`, and `libpam` must be installed.
@@ -103,24 +110,41 @@ the necessary dependencies can be installed using
103110

104111
[source, console]
105112
----
106-
# apt install --no-install-recommends autoconf automake libtool \
107-
pkg-config libfido2-dev libpam-dev libssl-dev asciidoc xsltproc \
108-
libxml2-utils docbook-xml
113+
sudo apt install --no-install-recommends
114+
asciidoc \
115+
autoconf \
116+
automake \
117+
docbook-xml \
118+
libfido2-dev \
119+
libpam-dev \
120+
libssl-dev \
121+
libtool \
122+
libxml2-utils \
123+
pkg-config \
124+
xsltproc \
125+
;
109126
----
110127

111128
On Fedora, the necessary dependencies can be installed using
112129

113130
[source, console]
114131
----
115-
# dnf -y install autoconf automake libtool libfido2-devel pam-devel \
116-
openssl-devel asciidoc
132+
sudo dnf -y install \
133+
asciidoc \
134+
autoconf \
135+
automake \
136+
libfido2-devel \
137+
libtool \
138+
openssl-devel \
139+
pam-devel \
140+
;
117141
----
118142

119143
Generate the build system using:
120144

121145
[source, console]
122146
----
123-
$ autoreconf --install
147+
autoreconf --install
124148
----
125149

126150
Then build as usual, see above under <<building,Building from a source tarball>>.
@@ -406,7 +430,7 @@ configuration tool provided with the module:
406430

407431
[source, console]
408432
----
409-
$ pamu2fcfg -uusername -opam://myorigin -ipam://myappid
433+
pamu2fcfg -uusername -opam://myorigin -ipam://myappid
410434
----
411435

412436
the tool will register a connected token by using the specified origin
@@ -430,7 +454,7 @@ It is then possible to generate a credential file with:
430454

431455
[source, console]
432456
----
433-
$ ssh-keygen -t ecdsa-sk -f ./credential.ssh
457+
ssh-keygen -t ecdsa-sk -f ./credential.ssh
434458
----
435459

436460
Supported key types are ecdsa-sk and ed25519-sk. Note that passphrase protected

0 commit comments

Comments
 (0)