PDA

View Full Version : Kali login keyboard configuration



fixi
2022-07-23, 15:08
I have a problem using Kali with Raspberry.
I run the keyboard setup with
sudo dpkg-reconfigure keyboard-configuration
and then
setxkbmap language
and so far everything ok, the keyboard is configured and also the language.
The problem is that this configuration is reset every time you exit the operating system, so at the next start, in the login form to access kali the keys do not correspond to the symbols I want to type and that make up the user and password, so I had to search the correspondence on the keyboard and every time I have to consult these notes to enter the correct user and password and enter the kali.
How can I change the configuration to avoid this problem when accessing kali?

Fred Sheehan
2022-08-01, 21:09
Isn't the Kali on raspberry a 'live' image (similar to an ISO image) and if so changes won't stick..

fixi
2022-08-02, 10:33
Isn't the Kali on raspberry a 'live' image (similar to an ISO image) and if so changes won't stick..

I was able to permanently set the keyboard from here:
sudo nano / etc / default / keyboard
Now there is another problem, I have to change the default user name which is kali, I type
usermod -l newusername kali
says there is an active process, so I type
kill -9 active process number && usermod -l kali
after sending, the computer logs out and the login form reappears so everything seems ok, now I should log in with the new username, but it isn't, there are still the old credentials where is the problem?
I also encounter the same problem with changing the password of the root user, typing
sudo on passwd
I enter pw, I repeat the pw, I am told that it has been updated, I reboot, then I try a sudo apt-get update and I am immediately root, with no root password required, the changes are not saved, how do I fix?

Fred Sheehan
2022-08-02, 17:32
create a new user, use the -m switch to create a home directory

sudo useradd -m new_username
sudo passwd new_username

you'll be asked for a new password twice..
then add the new user to sudoers

sudo usermod -a -G sudo new_username

log out and back in with new username/password
remove default account

sudo userdel –r old-username

fixi
2022-08-02, 18:25
create a new user, use the -m switch to create a home directory

sudo useradd -m new_username
sudo passwd new_username

you'll be asked for a new password twice..
then add the new user to sudoers

sudo usermod -a -G sudo new_username

log out and back in with new username/password
remove default account

sudo userdel –r old-username


ok thanks, the commands I give them as root?

fixi
2022-08-04, 17:54
I tried, everything works ok, thanks.
Only one thing, when I do userdel, it says that the user kali (default user) was not found, but I only created the new user so the default one should still be there, what should I do?

Fred Sheehan
2022-08-04, 22:06
Then maybe its already not there;
cat etc/passwd

will list any users

fixi
2022-08-06, 16:06
Hi, he tells me:
no such file or directory
I don't understand, shouldn't it find at least the current user?

Fred Sheehan
2022-08-07, 00:41
sorry, my bad

cat /etc/passwd

fixi
2022-08-07, 17:08
Ok thanks, the / symbol was missing in front of etc, I have to be very careful, it's a moment to make mistakes.
I visualize the list, I see that there are several users, in practice each installed program corresponds to a user?
Then I also see the last user I created and the default one I don't see, even if I haven't deleted it.

Fred Sheehan
2022-08-07, 22:13
Normally there are at least 2 users on a system, your user account and the root user account.

fixi
2022-08-08, 14:10
Ok, but everything else? It seems that every installed program sees it as a user