## create user
Code
root@raspberrypi:~# deluser kevin --remove-home
Looking for files to backup/remove ...
Removing files ...
Removing user `kevin' ...
Warning: group `kevin' has no more members.
Done.
root@raspberrypi:~# grep kevin /etc/passwd
root@raspberrypi:~# grep kevin /etc/group
root@raspberrypi:~# ls -al /home/
total 8
drwxr-xr-x 2 root root 4096 Jun 17 19:53 .
drwxr-xr-x 25 root root 4096 Jun 17 18:57 ..
root@raspberrypi:~#
root@raspberrypi:~#
root@raspberrypi:~# adduser kevin
Adding user `kevin' ...
Adding new group `kevin' (1000) ...
Adding new user `kevin' (1001) with group `kevin' ...
Creating home directory `/home/kevin' ...
Copying files from `/etc/skel' ...
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Changing the user information for kevin
Enter the new value, or press ENTER for the default
Full Name []:
Room Number []:
Work Phone []:
Home Phone []:
Other []:
Is the information correct? [Y/n] y
root@raspberrypi:~#
root@raspberrypi:~# grep kevin /etc/passwd
kevin:x:1001:1000:,,,:/home/kevin:/bin/bash
root@raspberrypi:~# grep kevin /etc/group
kevin:x:1000:
root@raspberrypi:~#
root@raspberrypi:~# ls -al /home/kevin/
total 20
drwxr-xr-x 2 kevin kevin 4096 Jun 17 19:54 .
drwxr-xr-x 3 root root 4096 Jun 17 19:54 ..
-rw-r--r-- 1 kevin kevin 220 Jun 17 19:54 .bash_logout
-rw-r--r-- 1 kevin kevin 3526 Jun 17 19:54 .bashrc
-rw-r--r-- 1 kevin kevin 675 Jun 17 19:54 .profile
root@raspberrypi:~#
Alles anzeigen
## cannot login
Code
root@raspberrypi:~# ssh kevin@192.168.10.10
The authenticity of host '192.168.10.10 (192.168.10.10)' can't be established.
ECDSA key fingerprint is SHA256:sPtX7ypEUIcSIij+2qvvRwUBBtMKYhesGt/usGLzxjA.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.10.10' (ECDSA) to the list of known hosts.
kevin@192.168.10.10's password:
Permission denied, please try again.
kevin@192.168.10.10's password:
Permission denied, please try again.
kevin@192.168.10.10's password:
Permission denied (publickey,password).
root@raspberrypi:~#
Alles anzeigen
## su kevin , cannot login
Code
root@raspberrypi:~# su kevin
kevin@raspberrypi:/root$ cd
kevin@raspberrypi:~$ ssh localhost
The authenticity of host 'localhost (127.0.0.1)' can't be established.
ECDSA key fingerprint is SHA256:sPtX7ypEUIcSIij+2qvvRwUBBtMKYhesGt/usGLzxjA.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'localhost' (ECDSA) to the list of known hosts.
kevin@localhost's password:
Permission denied, please try again.
kevin@localhost's password:
Permission denied, please try again.
kevin@localhost's password:
Permission denied (publickey,password).
Alles anzeigen
## change pass
Code
kevin@raspberrypi:~$ passwd
Changing password for kevin.
(current) UNIX password:
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
kevin@raspberrypi:~$ ssh localhost
kevin@localhost's password:
Permission denied, please try again.
kevin@localhost's password:
Permission denied, please try again.
kevin@localhost's password:
Permission denied (publickey,password).
kevin@raspberrypi:~$
kevin@raspberrypi:~$ exit
exit
root@raspberrypi:~# ssh kevin@192.168.10.10
kevin@192.168.10.10's password:
Permission denied, please try again.
kevin@192.168.10.10's password:
Permission denied, please try again.
kevin@192.168.10.10's password:
Permission denied (publickey,password).
Alles anzeigen
-----------------------
Can someone help me solve the problem? Thank you very much