LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 01-27-2022, 10:27 AM   #1
khunphet
Member
 
Registered: Jul 2007
Location: Chiang Rai, THAILAND
Distribution: Started with Kubuntu then Lucid Puppy and now XenialPup-7.5 & Mint
Posts: 109

Rep: Reputation: 0
Unhappy switching users in Mint 19.2


I'm using Mint 19.2 and when I log in at a terminal I see "peter@peter - ThinkPad-X41" at the command line. I presume that "peter" is a user who is using a ThinkPad X41. Attempting to run any commands, I keep getting asked for peter's password which I haven't the slightest notion just what peter's password is. I've tried entering a whole gamut of possible passwords, but none of them get accepted as correct. I presume there must have been a password when I first used Mint, but the darn password has been forgotten for sure. Is there some way to reset peter's password without knowing what the original password was? It is indeed a sign of my age that I can no longer recall what password I originally entered when I first used Mint. But there must be a way around this road block so that I can actually Mint to my advantage. Hoping the good folks can shed some light on the subject.
 
Old 01-27-2022, 11:53 AM   #2
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
That prompt 'peter@peter - ThinkPad-X41' (and that you say you have already logged in), seems to indicate that user 'peter' is already logged in to machine 'peter' which is a ThinkPad-X41, so it puzzles me that you need a password to run commands. It is possible that the system is not properly mounting your home directory and as a result you are unable to do a lot of things.

What is the output of the command 'pwd', and please post the full detail (command and response) here so we can see exactly what the system is telling you. The previous description
Code:
Attempting to run any commands, I keep getting asked for peter's password
does not tell us what is actually happening

If you actually need to change a password you can always boot to a live distro via USB then follow a few simple steps to reset your password.

I am not sure with mint if these are the same (but they should be.) I use fedora mostly.

1. boot to the live usb
2. switch to super user (root) with the su command in a terminal
3. mount the root file system on the installed drive to /mnt (make sure to replace sda2 in the following with the proper device ID for your system.)
Code:
mount /dev/sda2 /mnt
4. mount the needed system directories on the newly mounted file system
Code:
mount --bind /proc /mnt/proc
mount --bind /sys  /mnt/sys
mount --bind /run  /mnt/run
mount --bind /dev  /mnt/dev
5. chroot to the installed file system
Code:
chroot /mnt
6. Change the password for your user (replace 'username' with your actual username on that system.)
Code:
passwd username
7. once the password has been successfully changed then simply reboot to the main system and log in.
 
Old 01-27-2022, 09:31 PM   #3
khunphet
Member
 
Registered: Jul 2007
Location: Chiang Rai, THAILAND
Distribution: Started with Kubuntu then Lucid Puppy and now XenialPup-7.5 & Mint
Posts: 109

Original Poster
Rep: Reputation: 0
switching users in MINT 19.2

ATTN: for all viewers; This thread was, by my own hand, unintentionaly marked [SOLVED] -- in fact it is NOT yet solved and I do not know how to remove the [SOLVED] marking.

For computersavvy: Thanks for your input. The result of the command 'pwd' is only one single line:

peter@peter-ThinkPad-X41:~$ pwd
/home/peter
peter@peter-ThinkPad-X41:~$

As an example of Mint asking for peter's password, what I was/am trying to do is add gparted to my Mint installation:

peter@peter-ThinkPad-X41:~$ gparted

Command 'gparted' not found, but can be installed with:

sudo apt install gparted

peter@peter-ThinkPad-X41:~$ sudo apt install gparted
[sudo] password for peter:

and, of course this is whewe I am stuck at this time as I have no idea what peter's password is since it was quite some time ago that I did install the first user, i.e. peter, on the Mint installation and apparently had made no note of the password I had entered at that time.

At this point, I do an Ctrl-Alt-T which returns me to the terminal with the peter@peter-ThinkPad-X41:~$ prompt. I hope this provides the information you need to better understand the problem.
 
Old 01-28-2022, 05:27 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,850

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
you need to boot into single user mode (as root) and set the password of peter again.
 
1 members found this post helpful.
Old 01-28-2022, 10:59 AM   #5
JeremyBoden
Senior Member
 
Registered: Nov 2011
Location: London, UK
Distribution: Debian
Posts: 1,947

Rep: Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511
Actually, isn't "peter-ThinkPad-X41" likely to be your hostname?

You can check this with
Code:
cat /etc/hostname
(no password required).

It's fairly easy to change (with root access).
 
Old 01-28-2022, 06:46 PM   #6
khunphet
Member
 
Registered: Jul 2007
Location: Chiang Rai, THAILAND
Distribution: Started with Kubuntu then Lucid Puppy and now XenialPup-7.5 & Mint
Posts: 109

Original Poster
Rep: Reputation: 0
switching users in MINT 19.2

For JeremyBoden: Sure enough! 'peter@peter-ThinkPad-X41' IS my hostname as the command
'cat /etc/hostname' proved. You note that the hostname is fairly easy to change; 1) why would I want to do that and 2) exactly what does the hostname signify and what is its purpose?

For pan64: I did as suggested and lo and behold - I was able to enter a new password and Mint was quite happy with it as well. I then went on to add the package gparted to my USB Mint installation and that too went quite well. Many thanks for your help.

Once I hear back from Jeremy, I think that my situation/original problem can be marked as solved. Having the experts close at hand is very satisfying for a oldtimer like myself who is still learning the Linux ropes. Many thanks indeed.
 
Old 01-29-2022, 06:01 AM   #7
JeremyBoden
Senior Member
 
Registered: Nov 2011
Location: London, UK
Distribution: Debian
Posts: 1,947

Rep: Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511
The usual CLI prompt is username@hostname
If you have several networked devices (such as routers, printers, mobiles, PC's etc) the hostname is a useful way to distinguish between devices.
It can be convenient to associate the hostname with its IP address, so that you could issue commands like ssh some-meaningful-hostname

When you entered peter during installation, the installer generated "peter-ThinkPad-X41" - expecting you to change it to a sensible name.
I'm guessing that the hostname is either too long or looks strange if you have multiple users?

I like to use short hostnames for desktops or my VM's - such as deb11, hal, pi, nas etc.
There is no need to change your hostname, but you can do it.

https://linuxconfig.org/how-to-change-hostname-on-linux gives several different ways.
It's not mentioned, but you should probably do a reboot afterwards.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mint 20.1 "draggy" when switching users. pixellany Linux Mint 2 08-14-2021 10:45 AM
[SOLVED] switching mouse button won't take effect/switching language won't apply/zukitwo theme looking rough vienswuer Linux - Distributions 1 05-16-2016 06:32 AM
[SOLVED] cron job stopped working after switching from Mint 14 to Mint 13 Don_Nadie Linux Mint 16 05-11-2015 03:16 AM
KDE 3.3 Bad Monitor Switching on Desktop Switching Inchoate Linux - Software 1 05-25-2005 02:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration