Beruflich Dokumente
Kultur Dokumente
sudo su - root
identify if user <<userid>> is exist then delete to create from scratch.
[root@HOSTNAME ~]$ userdel -r <<userid>>
create a new group <<userid>>
[root@HOSTNAME ~]$ groupadd <<userid>>
#Encrypt your password using below command
[root@HOSTNAME ~]$ openssl passwd -crypt <<userpassword>>
create new user <<userid>> and assign to group <<userid>>
[root@HOSTNAME ~]$ useradd -m -c "Application User" -p <<encriptedpassword>> -g
<<userid>> <<userid>>
verify newly created user
[root@HOSTNAME ~]$ cat /etc/passwd | grep <<userid>>
[root@HOSTNAME ~]$ id <<userid>>
Try to login to the user, for which the password would be "<<userpassword>>"
[<<userid>>@HOSTNAME ~]$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/<<userid>>/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/<<userid>>/.ssh/id_rsa.
Your public key has been saved in /home/<<userid>>/.ssh/id_rsa.pub.
The key fingerprint is:
19:0b:a7:37:47:f6:2f:a2:c4:03:10:54:c3:f3:86:8b <<userid>>@HOSTNAME
The key's randomart image is:
+--[ RSA 2048]----+
|
+. ... |
|
. = . . . |
|
. E O o . .|
|
= B * . . |
|
S * o
|
|
o +
|
|
|
|
|
|
|
+-----------------+
[<<userid>>@HOSTNAME ~]$
total 16
drwx------. 3 <<userid>>
-rw-------. 1 <<userid>>
-rw-r--r--. 1 <<userid>>
drwx------. 2 <<userid>>
ls -lart .ssh
<<userid>>
<<userid>>
<<userid>>
<<userid>>
4096
1675
418
4096
Apr
Apr
Apr
Apr
26
26
26
26
13:11
13:16
13:16
13:16
..
id_rsa
id_rsa.pub
.