Linux - Newbie This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
|
04-11-2017, 04:57 AM
|
#31
|
Senior Member
Registered: Nov 2005
Location: ...uncanny valley... infinity\1975; (randomly born:) Milwaukee, WI, US( + travel,) Earth&Mars (I wish,) END BORDER$!◣◢┌∩┐ Fe26-E,e...
Distribution: any GPL that work on freest-HW; has been KDE, CLI, Novena-SBC but open.. http://goo.gl/NqgqJx &c ;-)
Posts: 4,888
|
You don't need a user name for Kali did you read even it's  docs plus what are you using it for?
|
|
|
04-11-2017, 07:17 AM
|
#32
|
LQ Guru
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342
|
Quote:
Originally Posted by Safeway44
I forgot my username as well. I tried root already. How do I reset the username?
|
if you can log in root,
Code:
ls /home
# to get user names off of home directory
#then being root just reset user passwd
passwd UserName
One reason I do Not use a Distro that hides root. ie Ubuntutu - one has to jump through hoops to get into the root account.
Last edited by BW-userx; 04-11-2017 at 07:18 AM.
|
|
|
04-11-2017, 08:13 AM
|
#33
|
Senior Member
Registered: Nov 2005
Location: ...uncanny valley... infinity\1975; (randomly born:) Milwaukee, WI, US( + travel,) Earth&Mars (I wish,) END BORDER$!◣◢┌∩┐ Fe26-E,e...
Distribution: any GPL that work on freest-HW; has been KDE, CLI, Novena-SBC but open.. http://goo.gl/NqgqJx &c ;-)
Posts: 4,888
|
Off topic (and not in the security forum anyways:) If you are the only one standing for a "truth" it is more than likely not! http://lmgtfy.com/?q=Stand+up+for+Tr...g+alone+author 
Last edited by jamison20000e; 04-11-2017 at 08:18 AM.
|
|
|
04-11-2017, 12:41 PM
|
#34
|
LQ Addict
Registered: Dec 2013
Posts: 19,872
|
Quote:
Originally Posted by Safeway44
I forgot my username as well. I tried root already. How do I reset the username?
|
https://duckduckgo.com/?q=kali+linux+forgot+username
like i said before, it seems to be a rather common occurence 
Last edited by ondoho; 04-11-2017 at 12:42 PM.
|
|
|
04-12-2017, 08:52 AM
|
#35
|
Member
Registered: Apr 2017
Location: Land of the Lost
Distribution: Kali
Posts: 32
Original Poster
Rep: 
|
Quote:
Originally Posted by BW-userx
if you can log in root,
|
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?
|
|
|
04-12-2017, 09:02 AM
|
#36
|
LQ Guru
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342
|
Quote:
Originally Posted by Safeway44
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
Last edited by BW-userx; 04-12-2017 at 09:06 AM.
|
|
|
04-12-2017, 12:28 PM
|
#37
|
LQ Addict
Registered: Dec 2013
Posts: 19,872
|
Quote:
Originally Posted by Safeway44
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?
|
mount code? what's that?
like this prhaps?
...
Last edited by ondoho; 04-12-2017 at 12:29 PM.
|
|
1 members found this post helpful.
|
04-13-2017, 03:27 AM
|
#38
|
Member
Registered: Jun 2016
Distribution: any&all, in VBox; Ol'UnixCLI; NO GUI resources
Posts: 999
|
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 
|
|
|
04-15-2017, 07:06 AM
|
#39
|
Member
Registered: Apr 2017
Location: Land of the Lost
Distribution: Kali
Posts: 32
Original Poster
Rep: 
|
Quote:
Originally Posted by BW-userx
sudo blkid # to get the proper device address for hdd's
#after I figured out which is the Hdd on my Hardware.
|
Did it and I got a list of sda* and UUID's and more.
You meant the sda* when you said device address?
Quote:
Originally Posted by BW-userx
mount /dev/sdxx /mnt # or whatever mount point you want to use
|
For sdxx I used my root and home sdaxx and I got "can't find in /etc/fstab"
Also noticed su was in red color. Why is that?
Quote:
Originally Posted by BW-userx
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.
|
I went thruough Grub and got root@(none) but I had the live cd in there anyway and followed your suggestions
Quote:
Originally Posted by BW-userx
ls /home # to get the username(s)
|
I typed it and got:
root@(none): ls/home
bash: ls/home: No such file or directory
Quote:
Originally Posted by BW-userx
#as Root user
passwd username
|
typed exactly that didn't work.
Quote:
Originally Posted by BW-userx
#then just change the password.
|
I'm trying to change the username this time not password, as we solved the passwd issue on the previous pages
Does having root@(none) mean I am in root for the installed version of kali on my hd?
Last edited by Safeway44; 04-15-2017 at 07:27 AM.
|
|
|
04-15-2017, 07:26 AM
|
#40
|
Member
Registered: Apr 2017
Location: Land of the Lost
Distribution: Kali
Posts: 32
Original Poster
Rep: 
|
Quote:
Originally Posted by ondoho
|
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.
|
|
|
04-15-2017, 04:26 PM
|
#41
|
LQ Guru
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342
|
Quote:
Originally Posted by Safeway44
Did it and I got a list of sda* and UUID's and more.
You meant the sda* when you said device address?
|
Bold is device address.
Code:
userx@slackwhere⚡~ $sudo blkid
/dev/sda1: LABEL="System Reserved" UUID="7E88DA2288D9D8AB" TYPE="ntfs" PARTUUID="0f3f3740-01"
/dev/sda2: UUID="01D285E8BED961F0" TYPE="ntfs" PARTUUID="0f3f3740-02"
/dev/sda3: UUID="FC9AF6529AF608C2" TYPE="ntfs" PARTUUID="0f3f3740-03"
/dev/sda5: UUID="8874f530-39a7-4bba-b71c-cc3270cdd826" TYPE="ext4" PARTUUID="0f3f3740-05"
/dev/sda6: UUID="218cff91-944d-454f-98ac-b1d162326e95" TYPE="ext4" PARTUUID="0f3f3740-06"
/dev/sda7: LABEL="home" UUID="06c24029-5acf-4981-aeda-b998cdff7a07" TYPE="ext4" PARTUUID="0f3f3740-07"
/dev/sdb1: UUID="59F69911097E2C92" TYPE="ntfs" PARTUUID="a7902330-01"
/dev/sdb2: LABEL="slack-mirror" UUID="09ae32b2-2107-48a3-8ca0-29645777c0b9" TYPE="ext4" PARTUUID="a7902330-02"
/dev/mmcblk0: PTUUID="0002a713" PTTYPE="dos"
/dev/mmcblk0p1: UUID="bbc5593f-68d1-4439-a6ee-4235e9864d81" TYPE="swap" PARTUUID="0002a713-01"
/dev/sdc1: LABEL="WD3TB" UUID="f444efc4-10dd-4867-a6e1-c5a32e9728e4" TYPE="ext4"
userx@slackwhere⚡~ $
Quote:
Originally Posted by Safeway44
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.
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.
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.
Last edited by BW-userx; 04-15-2017 at 04:33 PM.
|
|
|
04-16-2017, 07:07 AM
|
#42
|
Member
Registered: Apr 2017
Location: Land of the Lost
Distribution: Kali
Posts: 32
Original Poster
Rep: 
|
Quote:
Originally Posted by BW-userx
in Live OS.
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
|
|
|
04-16-2017, 08:31 AM
|
#43
|
Senior Member
Registered: Nov 2005
Location: ...uncanny valley... infinity\1975; (randomly born:) Milwaukee, WI, US( + travel,) Earth&Mars (I wish,) END BORDER$!◣◢┌∩┐ Fe26-E,e...
Distribution: any GPL that work on freest-HW; has been KDE, CLI, Novena-SBC but open.. http://goo.gl/NqgqJx &c ;-)
Posts: 4,888
|
|
|
|
04-16-2017, 11:57 AM
|
#44
|
LQ Guru
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS, Manjaro
Posts: 6,326
|
Quote:
Originally Posted by jamison20000e
|
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.
|
|
1 members found this post helpful.
|
04-16-2017, 02:59 PM
|
#45
|
Senior Member
Registered: Nov 2005
Location: ...uncanny valley... infinity\1975; (randomly born:) Milwaukee, WI, US( + travel,) Earth&Mars (I wish,) END BORDER$!◣◢┌∩┐ Fe26-E,e...
Distribution: any GPL that work on freest-HW; has been KDE, CLI, Novena-SBC but open.. http://goo.gl/NqgqJx &c ;-)
Posts: 4,888
|
|
|
|
All times are GMT -5. The time now is 05:58 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|