Re: When fogetting assigned login name rather than password
On Sat, 2014-03-15 at 05:45 -0500, Richard Owlett wrote:
> If another OS had not been available but I knew the root
> password, is there some way I could have gained access as root?
If you don't remember the root's password you need to chroot or
systemd-nspawn -D. A hint that very often is censored by German forum
admins :D.
If you remember the root password, than I don't understand your problem.
An idiotic script I don't use, but I wrote to reply to a different, but
similar question:
[rocketmouse@archlinux ~]$ cat /usr/local/bin/chpassword
#!/bin/sh
echo -n "Change password of user: "
read username
echo -n "Do it being user: "
read su_user
if [ "$(id -u)" != "0" ]; then echo -n "$su_user's "; fi
su $su_user -c "passwd $username"
echo "Push enter to quit."
read push_rtn
exit
IOW if you could become root, you could do what ever you want. Take a
look at what users have an account and change the password of the user
you want. You can see all users by $ cat /etc/passwd assumed you
forget a username.
You can't see the password a user used, but you can change the password,
without knowing the user's password.
Reply to: