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.
So I use the Kali Live CD,and go into the terminal from within Kali OS live CD?
Or do I just get into root thru Grub like I did for the password solution?
Quote:
Originally Posted by BW-userx
Code:
ls /home
# to get user names off of home directory
#then being root just reset user passwd
passwd UserName
Do I need to mount first to do that within Kali Live CD? Could I get the mount code for that please?
So I use the Kali Live CD,and go into the terminal from within Kali OS live CD?
Or do I just get into root thru Grub like I did for the password solution?
Do I need to mount first to do that within Kali Live CD? Could I get the mount code for that please?
in Live OS.
I would do this
Code:
sudo blkid # to get the proper device address for hdd's
#after I figured out which is the Hdd on my Hardware.
su
passwd
mount /dev/sdxx /mnt # or whatever mount point you want to use
#then it is
ls /mountpoint/home # to get user names in the mounted system
chroot is someone else area of experttezze
If you got in to root through grub on your physical system. Then you'd already be in that physical system not usb stick OS.
Therefore you're in the root account of the effected system so.
Code:
ls /home # to get the username(s)
#as Root user
passwd username
#then just change the password.
#done
note:
sdxx is just notation for what could be, and not the actual address of the device. replace the sdxx with the actual device address of your device
So I use the Kali Live CD,and go into the terminal from within Kali OS live CD?
Or do I just get into root thru Grub like I did for the password solution?
many different ways to skin a cat. both is possible.
or maybe i could interest you in this article?
Quote:
Do I need to mount first to do that within Kali Live CD? Could I get the mount code for that please?
Concept (important to learn&understand via web-researching & experimenting):
grub 'e' to change ('linux line', from hdd not USB, temporarily) TO: rw init=/bin/sh
THEN, you can use the `passwd` command to 'fix' /etc/{passwd,shadow} to your liking.
Interesting to notice: ps ax|grep -v ]
Disclaimer: I won't try Kali -until- I've successfully suicided, to avoid NSAetc
I did the search and none were relevant i.e not about changing the username. They were all about changing the password which we have successfully done.
For sdxx I used my root and home sdaxx and I got "can't find in /etc/fstab"
Quote:
Originally Posted by Safeway44
Also noticed su was in red color. Why is that?
what commands did you issue to get that?
red is a user specified color to let the user know he or she is in root account just by seeing the red.
taking from the results of blkid above.
Code:
ls /tmp
to see if it is empty. If there are more directories inside of that directory as some times their is. Depending on distro.
if yes then use an empty on in /tmp
if no then
Code:
where sdaxx id this
#mount /dev/sda1 <-- the replacement of the actual letter and number.
#mount /dev/sdc1 /tmp
Quote:
Originally Posted by Safeway44
I went thruough Grub and got root@(none) but I had the live cd in there anyway and followed your suggestions
ok
Quote:
Originally Posted by Safeway44
I typed it and got:
root@(none): ls/home
bash: ls/home: No such file or directory
typed exactly that didn't work.
you forgot to stick out your tongue and hit the space key.
Code:
ls /home
Quote:
Originally Posted by Safeway44
I'm trying to change the username this time not password, as we solved the passwd issue on the previous pages
hum just change the user name and keep the passwd... I know I think that can be done. I think I have seen others edit the files to make it happen.
I stay away from that methodology for passwords user name change even though I remember I gave it a shot and it did not fail. I just rather do it my way.
so you may have to research how to actually do that. Or hope someone else catches this in here and posts you how to's. or post another separate question just for that or search LQ to see if you can find it. I know it got a be in here.
creating a new user you are still going to have to give it a passwd.
Quote:
Originally Posted by Safeway44
Does having root@(none) mean I am in root for the installed version of kali on my hd?
I bet that means something I actually have no real Idea about. It could mean that you did not give your install a HOSTNAME, or it could mean that the CD (was it) does not have a HOSTNAME
I do not boot off DVD/CD I use USB Sticks and get my ooooopps I shouldn't have done that fixed by whatever means necessary to keep to a very strict time limit of, as soon as possible.
I would do this
sudo blkid # to get the proper device address for hdd's
#after I figured out which is the Hdd on my Hardware.
su
passwd
Quote:
Originally Posted by BW-userx
mount /dev/sdxx /mnt # or whatever mount point you want to use
I got
can't find in /etc/fstab
Quote:
Originally Posted by BW-userx
#then it is
ls /mountpoint/home # to get user names in the mounted system
Quote:
Originally Posted by BW-userx
ls /home # to get the username(s)
#as Root user
I typed
ls /home and pressed enter, but no list of usernames. Are the usernames meant to be in etc/passwd?
What path should I take to get there?
Quote:
Originally Posted by BW-userx
passwd username
#then just change the password.
I'm trying to change only the username now,not the password.
After typing passwd username I got the following line:
passwd: user 'username' does not exist
While it is possible to change the name of a user, it is not something that should be attempted without protective automation tools by anyone who has to ask how.
Deleting the old user and then adding the new one is the way that is safe. Just make sure that you back up any critical special user files first, so you can restore them to the new users later.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.