This shows you the differences between two versions of the page.
|
isc:labs:11 [2026/01/11 20:55] florin.stancu |
isc:labs:11 [2026/01/12 10:52] (current) florin.stancu [00 [0p]. Users] |
||
|---|---|---|---|
| Line 15: | Line 15: | ||
| sudo useradd -m -s /bin/bash green | sudo useradd -m -s /bin/bash green | ||
| sudo useradd -m -s /bin/bash blue | sudo useradd -m -s /bin/bash blue | ||
| + | sudo passwd red # enter a password, e.g. `student` | ||
| + | # same for green / blue | ||
| </code> | </code> | ||
| + | |||
| + | Then, create ''/etc/ssh/sshd_config.d/50-gpgusers.conf'' (don't forget ''sudo'' ;) ) and put: | ||
| + | <code> | ||
| + | Match User "red" | ||
| + | PasswordAuthentication yes | ||
| + | Match User "green" | ||
| + | PasswordAuthentication yes | ||
| + | Match User "blue" | ||
| + | PasswordAuthentication yes | ||
| + | </code> | ||
| + | |||
| + | Finally, ''sudo systemctl restart sshd''. | ||
| <note tip> | <note tip> | ||