Page 1 of 2

[OPEN] Lost my account login --

Posted: Thu Jun 13, 2019 3:47 am
by userx-bw
I was trying out zsh and changed back to bash logged out then my user was gone in my login manager, switched ttys tried logging in that way kept getting invalid login, I am in a live and my passwd in the system still shows me as there.

Code: Select all

userx:x:1000:1000:userx-bw:/home/userx:/usr/bin/bash

Code: Select all

sudo chsh -s $(which bash)
is there a way to backdoor into root account login to see if I can fix it? Other than that I have no idea what to do short of re-installing the system.

Re: Lost my account login --

Posted: Thu Jun 13, 2019 5:17 am
by xeoncpu
Hi! You can do ctrl+alt+F2 or F3 at login screen and you got TTY login screen then log in with root and delete your user account.

https://www.cyberciti.biz/faq/linux-rem ... r-command/

Re: [OPEN] Lost my account login --

Posted: Thu Jun 13, 2019 6:46 am
by erikdubois
There is a topic about deleting an account and making one here :

viewtopic.php?f=79&t=567&p=2158&hilit=a ... 5ed8#p2158

If you can not assume the role of root.

you need to chroot into your system.

https://arcolinux.com/how-to-fix-any-ar ... s-manjaro/

Re: Lost my account login --

Posted: Thu Jun 13, 2019 2:01 pm
by userx-bw
xeoncpu wrote:
Thu Jun 13, 2019 5:17 am
Hi! You can do ctrl+alt+F2 or F3 at login screen and you got TTY login screen then log in with root and delete your user account.

https://www.cyberciti.biz/faq/linux-rem ... r-command/
nope stated that. root and my user give me invalid login. as because root doen't log in brought me to wondering if this is anything like Ubunututututu, where root user is hidden and needs to have a passwd established after install. if you do not understand what that is don'r worry about it.

Re: [OPEN] Lost my account login --

Posted: Thu Jun 13, 2019 2:07 pm
by userx-bw
erikdubois wrote:
Thu Jun 13, 2019 6:46 am
There is a topic about deleting an account and making one here :

viewtopic.php?f=79&t=567&p=2158&hilit=a ... 5ed8#p2158

If you can not assume the role of root.

you need to chroot into your system.

https://arcolinux.com/how-to-fix-any-ar ... s-manjaro/
yeaaahhhh I was thinking chroot but install grub is all I've ever done with it, so I am not too expert-y on this. I'll give it a go, thanks for the instructions. it was late last night when I posted this..
okay
that's it, no mounting everything then chroot, just them two commands?
so what is that a script that does the command for ya?

Code: Select all

mount /dev/sda2 /mnt
arch-chroot /mnt
then issue the commands to delete user and adduser and what about getting root user back on the system? (asking before trying)

I am stting here on Slackware (this Laptop is dual boot) could I chroot from here and not mess anything up by "mixing distro" to chroot and change stuff on a different distro?

that first like saves me time looking up Slackware post install, where i use something very similar adduser line, then change the groups and user to what I need. for something other than Slackware.

---- Okay not really wanting to wait for an answer to them questions, this seems simple enough -----

Code: Select all

userx@slack.it.netters:~/Downloads
$ ls /mnt
README  cdrecorder  cdrom  dvd  floppy  hd  memory  tmp  zip
userx@slack.it.netters:~/Downloads
$ sudo mount /dev/sdb7 /mnt
userx@slack.it.netters:~/Downloads
$ sudo mount --bind /dev /mnt/dev
userx@slack.it.netters:~/Downloads
$ sudo mount --bind /proc /mnt/proc
userx@slack.it.netters:~/Downloads
$ sudo mount --bind /sys /mnt/sys
userx@slack.it.netters:~/Downloads
$ sudo chroot /mnt
                    /-                      root@slack.it.netters
                   ooo:                     ---------------------
                  yoooo/                    OS: ArcoLinux v19.05.2
                 yooooooo                   Kernel: 4.19.49
                yooooooooo                  Uptime: 45 mins
               yooooooooooo                 Packages: 1286 (pacman)
             .yooooooooooooo                Shell: bash 5.0.7
            .oooooooooooooooo               Theme: Arc-Dark [GTK2/3]
           .oooooooarcoooooooo              Icons: Sardi-Arc [GTK2/3]
          .ooooooooo-oooooooooo             Terminal: mrxvt
         .ooooooooo-  oooooooooo            CPU: Intel i5-5300U (4) @ 2.900GHz
        :ooooooooo.    :ooooooooo           GPU: Intel HD Graphics 5500
       :ooooooooo.      :ooooooooo          Memory: 1782MiB / 7370MiB
      :oooarcooo         .oooarcooo
     :ooooooooy           .ooooooooo
    :ooooooooo   /ooooooooooooooooooo
   :ooooooooo      .-ooooooooooooooooo.
  ooooooooo-             -ooooooooooooo.
 ooooooooo-                 .-oooooooooo.
ooooooooo.                     -ooooooooo

[root@slack /]#
[root@slack /]# sudo useradd -m temper -g users -G "adm,audio,floppy,log,network,rfkill,scanner,storage,optical,power,wheel" -s /bin/bash
[root@slack /]# passwd temper
New password:
Retype new password:
passwd: password updated successfully
[root@slack /]# passwd root
New password:
Retype new password:
passwd: password updated successfully
[root@slack /]# passwd userx
New password:
Retype new password:
passwd: password updated successfully
[root@slack /]# exit
exit
userx@slack.it.netters:~/Downloads
$ sudo unmount /mnt
sudo: unmount: command not found
userx@slack.it.netters:~/Downloads
$ sudo umount /mnt
umount: /mnt: target is busy.
userx@slack.it.netters:~/Downloads
$ sudo umount -l /mnt
userx@slack.it.netters:~/Downloads
$ ls /mnt
README  cdrecorder  cdrom  dvd  floppy  hd  memory  tmp  zip
userx@slack.it.netters:~/Downloads
just need to reboot and see if that worked or not.

Re: [OPEN] Lost my account login --

Posted: Thu Jun 13, 2019 4:03 pm
by userx-bw
erikdubois wrote:
Thu Jun 13, 2019 6:46 am
There is a topic about deleting an account and making one here :

viewtopic.php?f=79&t=567&p=2158&hilit=a ... 5ed8#p2158

If you can not assume the role of root.

you need to chroot into your system.

https://arcolinux.com/how-to-fix-any-ar ... s-manjaro/
it half worked, I had to mount my seperate partition for /home create a dir for user chown etc.. it was ok.. but I decided to re-install anyways, and now that I am re-installed I check logging in as root on a different tty and I get login invalid, I did this

Code: Select all

[userx@arcomeo ~]$ su
Password: 

[root@arcomeo userx]# passwd root
New password: 
Retype new password: 
passwd: password updated successfully
[root@arcomeo userx]# 
tried again and still not letting me log in as root user, how do I fix that issue?

Re: [OPEN] Lost my account login --

Posted: Thu Jun 13, 2019 8:50 pm
by erikdubois

Re: [OPEN] Lost my account login --

Posted: Thu Jun 13, 2019 9:06 pm
by userx-bw
erikdubois wrote:
Thu Jun 13, 2019 8:50 pm
Did you check this one.

http://arcolinuxforum.com/viewtopic.php ... 0db3#p4612
I am talking about root user in an installed system, had I had that, I might have been able to fix it. nevertheless, I really like to have root user so I can log in if needed to fix things as root user, not user sudo su to get root.

the one where one logs in

Code: Select all

root
passwd
#

Re: [OPEN] Lost my account login --

Posted: Thu Jun 13, 2019 10:00 pm
by erikdubois
Changing into root is easy once you have set a password for root.

This is after you set your password for root.

I actually think I have set my root password back in Calamares.


Re: [OPEN] Lost my account login --

Posted: Thu Jun 13, 2019 10:03 pm
by erikdubois
I think I get your question now.

You want to log as ROOT into lightdm.

Is that your question?

Would not recommend it if that is the case.

For educational purposes you can find a way here.

https://askubuntu.com/questions/126286/ ... ot-account