First login, sudo password not working, trying single user mode - keyboard not giving any input.
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
First login, sudo password not working, trying single user mode - keyboard not giving any input.
Hi,
If I'm asking question that's already solved then I'm sorry and redirect me please.
The problem is like in the title. I have just installed debian 4.19.171-2
[img]file:///C:/Users/chupito/Desktop/Temp/ver.JPG[/img]
Installed it on hyper-v. As with my previous installations I couldn't access root - the password I'd set up on install didn't work. But previously I was able to work it out by pressing "e" at the start and writing "init=/bin/bash" at the end of "linux" line:
[img]file:///C:/Users/chupito/Desktop/Temp/grub.JPG[/img]
Then by typing "mount -o remount,rw /" and "passwd".
My problem is that this time after getting command line in single user mode, after adding "init=/bin/bash" my keyboard doesn't give any input. It works on windows, obviously works in the grub while adding line, works in debian if I log in as standard user.
Can anyone help me out with this?
Thx.
Just throwing something out.
Mouse and keyboard (input) is handled by Xorg. Not sure how it works with Gnome and the Wayland thing but X is still installed and there is an Xorg.log in my Gnome. So first thing that comes to mind for me is lack of adequate graphics support, to get decent graphics in VMWare you install the xorg vmware driver. I don't have a clue what's what in a Hyper-V scenario. Perhaps you need to find what graphics device Hyper-V uses.
Also, with Debian I typically create a root user account during setup, no sudo. Many/most new installations after reboot I get (command not found) as root, I can't run any executables till I create a /root/.bashrc file with the contents in the code box below, and reboot. If you're using sudo rather than a root account, this likely won't make a difference. But if you created a root user during setup, it might make a difference.
Just throwing something out.
Mouse and keyboard (input) is handled by Xorg. Not sure how it works with Gnome and the Wayland thing but X is still installed and there is an Xorg.log in my Gnome. So first thing that comes to mind for me is lack of adequate graphics support, to get decent graphics in VMWare you install the xorg vmware driver. I don't have a clue what's what in a Hyper-V scenario. Perhaps you need to find what graphics device Hyper-V uses.
Also, with Debian I typically create a root user account during setup, no sudo. Many/most new installations after reboot I get (command not found) as root, I can't run any executables till I create a /root/.bashrc file with the contents in the code box below, and reboot. If you're using sudo rather than a root account, this likely won't make a difference. But if you created a root user during setup, it might make a difference.
I did create root user. I also had to add "normal" account - it wouldn't let me install the system without it. Don't know why. The root user have a password which, when I write it when prompted is followed by "Authentication failure." I've had this issue previously and I was able to go around it with the method I described in the first post. Keyboard works fine in windows and in debian apart from the single user mode. I don't know if creating this file would help but I have no permission to root folder, and can't create any files there or in // directory. The first place I can do anything at all starts in /home/%user%.
I'll add that it's usb keyboard if that makes a difference but previously everything worked fine. Previously means couple of days ago.
I don't know if creating this file would help but I have no permission to root folder, and can't create any files there or in // directory. The first place I can do anything at all starts in /home/%user%.
It probably won't help with your immediate issues, however if you did create a root account there is a good chance you'll need to do this eventually. Whenever I need to create this file, I do it from a Live session since as you mention, if you don't have root access you can't do root stuff, boot up Ubuntu live or something.
I have also had the same scenario where the root password after installation would not work, and using the init=/bin/bash trick plus passwd would do the trick. However I would not do the remount that you are doing, that part is taken care of with the kernel arguments, below is from my notes, obviously the kernel was at version 4.15 last time I had this issue.
Quote:
linux /boot/vmlinuz-4.15.0-42-generic root=UUID=3c1154e9-a98c-44d9-99c6-0aa09c02a319 ro quiet splash $vt_handoff
linux /boot/vmlinuz-4.15.0-42-generic root=UUID=3c1154e9-a98c-44d9-99c6-0aa09c02a319 rw init=/bin/bash
Anyway, if you can't change the root password from single user mode because of the keyboard, you can boot a Linux live, chroot into Debian and make the change. So assuming from the live session your virtual / is /dev/sda1, the instructions below should do it:
Code:
mount /dev/sda1 /mnt
for i in /sys /dev /dev/pts /proc /run; do mount -B $i /mnt$i; done
chroot /mnt
passwd
Enter new password
Confirm new password
exit
for i in /run /proc /dev/pts /dev /sys; do umount /mnt$i; done
umount /mnt
EDIT: Or boot the Debian installer in rescue mode and select the root partition and ask it to give you a terminal in /, you will automatically be in a chroot and should not need to do it manually as above. When going into rescue mode with Debian installer, it will appear to be installing as it will ask you all the questions it asked during installation, just answer them and eventually it will ask you which partition to select as / to work with, after selecting the / partition you can then select to open a terminal in root.
By default a regular user has very limited write permissions outside of their home directory. That's how linux works. To do so requires using su or sudo.
debian does not install sudo by default. su uses the root's password, sudo uses the regular users password. I don't use hyper-v but I never had a problem with Virtualbox or installing on a physical device. I've also never had problems with root password not working but I have the advantage of using US keyboard settings.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.