User Tools

Site Tools


unix:linux:sysadmin:syncusers

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Last revisionBoth sides next revision
unix:linux:sysadmin:syncusers [2022/01/17 18:37] rodolicounix:linux:sysadmin:syncusers [2022/01/17 18:39] rodolico
Line 40: Line 40:
 # echo 'mypassword' | openssl passwd -1 -stdin # echo 'mypassword' | openssl passwd -1 -stdin
 # 'ssh key' is the value found in ~/.ssh/id_rsa.pub # 'ssh key' is the value found in ~/.ssh/id_rsa.pub
 +# in the following example, 'user1' is created if they don't exist,
 +# and their password is changed to 'mypassword' (encrypted version given).
 +# nothing is done to their ssh key.
 +# user2 is treated the same way, but their ssh public key is added to their authorized_keys file
 my %passwords = ( my %passwords = (
       'user1'  => {       'user1'  => {
-  'password' =>   '$1$hpr.bGjU$VgEWjkSIWZS.jlgxDRnCd0',+                         'password' =>   '$1$hpr.bGjU$VgEWjkSIWZS.jlgxDRnCd0',
  'ssh key'  =>   ''  'ssh key'  =>   ''
                      },                      },
unix/linux/sysadmin/syncusers.txt · Last modified: 2022/01/17 18:40 by rodolico