Skip to content
This repository was archived by the owner on Apr 11, 2024. It is now read-only.

Commit b115f9f

Browse files
committed
fixup! feat: Add user configuration for all providers
Add users to the docs site
1 parent 0a77aa9 commit b115f9f

File tree

1 file changed

+56
-0
lines changed
  • docs/content/customization/generic

1 file changed

+56
-0
lines changed
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
+++
2+
title = "Users"
3+
+++
4+
5+
Configure users for all machines in the cluster, the user's superuser capabilities using `sudo` user specifications, and the login authentication mechanism.
6+
7+
> - SSH _authorized keys_ are just public SSH keys that are used to authenticate a login. See the [SSH man page](https://www.man7.org/linux/man-pages/man8/sshd.8.html#AUTHORIZED_KEYS_FILE_FORMAT) for more information.
8+
>
9+
> - For information on sudo user specifications, see the [sudo documentation](https://www.sudo.ws/docs/man/sudoers.man/#User_specification).
10+
>
11+
> - Local password authentication is disabled for the user by default. It is enabled only when a hashed password is provided.
12+
13+
## Examples
14+
15+
### Admin user with SSH public key login
16+
17+
Creates a user with the name `admin`, grants the user the ability to run any command as the superuser, and allows you to login via SSH using the username and private key corresponding to the authorized public key.
18+
19+
```yaml
20+
apiVersion: cluster.x-k8s.io/v1beta1
21+
kind: Cluster
22+
metadata:
23+
name: <NAME>
24+
spec:
25+
topology:
26+
variables:
27+
- name: clusterConfig
28+
value:
29+
users:
30+
- name: admin
31+
- sshAuthorizedKeys:
32+
- "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAua0lo8BiGWgvIiDCKnQDKL5uERHfnehm0ns5CEJpJw optional-comment"
33+
sudo: "ALL=(ALL) NOPASSWD:ALL"
34+
```
35+
36+
### Admin user with serial console password login
37+
38+
Creates a user with the name `admin,` grants the user the ability to run any command as the superuser, and allows you to login via serial console using the username and password.
39+
40+
> Note that this does not allow you to login via SSH using the username and password; in most cases, you must also configure the SSH server to allow password authentication.
41+
42+
```yaml
43+
apiVersion: cluster.x-k8s.io/v1beta1
44+
kind: Cluster
45+
metadata:
46+
name: <NAME>
47+
spec:
48+
topology:
49+
variables:
50+
- name: clusterConfig
51+
value:
52+
users:
53+
- name: admin
54+
hashedPassword: "$y$j9T$UraH8eN4XvapXBmmSaUrP0$Nyxdf1cJDGZcp0WDKu.CFHprrkPG4ubirqSqiD43Ix3"
55+
sudo: "ALL=(ALL) NOPASSWD:ALL"
56+
```

0 commit comments

Comments
 (0)