Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

(Solved) Wrong username in lightdm-greeter

Off-Topic discussions about science, technology, and non Debian specific topics.
Post Reply
Message
Author
Moltke
Posts: 41
Joined: 2017-03-16 18:10

(Solved) Wrong username in lightdm-greeter

#1 Post by Moltke »

Hi everyone! Hope you're all having a nice life! :)

Sorry to bother you all with this non-debian issue but I've been trying to figure out how to solve it and haven't had any luck so far. Few days ago, I created a Ubuntu 20.04 VM in KVM, when creating my user I made a typo and instead of moltke I accidentally wrote moltle and that's what I'm greeted with whenever I start and log in to the VM Image Like I said, I've been trying to fix this for days now without any luck so far, thus I decided to ask for help and see if anyone knows of a solution. It's not a big deal but still. Thanks in advance for your answers :)

EDIT: Thought you might need more info so just booted the VM up and will try to explain everything I've tried so far or at least as far as I remember.

I ran

Code: Select all

/usr/sbin/lightdm --test-mode --debug
and got this Image so username moltke gets read by lightdm, isn't it? but it doesn't show in the greeter box.

Code: Select all

lightdm --show-config
output gives Image I checked and play with some of those files but nothing worked. I read some posts here and there, arch wiki, debian wiki, ubuntu wiki ... nothing worked. Like I said. It's not really a big deal since everything works just fine but I'd like to know if this is somehow possible or not to fix.One thing I haven't tried is removing lightdm and reinstalling it ... hmmm, I'll try and se if it works, I think it won't but ... will do and come back with the results.

EDIT: Nope, didn't work. Still shows moltle instead of moltke guess is one of those things I'll have to live with lol
Last edited by Moltke on 2020-08-17 12:25, edited 1 time in total.

cuckooflew
Posts: 677
Joined: 2018-05-10 19:34
Location: Some where out west
Been thanked: 1 time

Re: Wrong username in lightdm-greeter

#2 Post by cuckooflew »

Well not sure if ubuntu works the same as Debian, but logic, delete and remove the user you don't want,..use 'useradd' or 'adduse' commands, see 'man useradd' for details.
to delete a user see 'man userdel' to change a user name 'man usermod' , these commands do work on Debian, but they might not work on ubuntu,...you should be using a ubuntu specific support forum.
You say you tried this,that and the other , plus more, but neglect to show or tell exactly what any of the things you tried really are, so maybe you also tried what I am suggesting, ? Do a search on 'dpkg -reconfigure', that also is a option.
BEST :
Remove Ubuntu form the HD, install Debian, create the user you want, and be sure to type in the user name correctly, would work as well.
Please Read What we expect you have already Done
Search Engines know a lot, and
"If God had wanted computers to work all the time, He wouldn't have invented RESET buttons"
and
Just say NO to help vampires!

Moltke
Posts: 41
Joined: 2017-03-16 18:10

Re: Wrong username in lightdm-greeter

#3 Post by Moltke »

cuckooflew wrote:Well not sure if ubuntu works the same as Debian, but logic, delete and remove the user you don't want,..use 'useradd' or 'adduse' commands, see 'man useradd' for details.
to delete a user see 'man userdel' to change a user name 'man usermod' , these commands do work on Debian, but they might not work on ubuntu,...you should be using a ubuntu specific support forum.
You say you tried this,that and the other , plus more, but neglect to show or tell exactly what any of the things you tried really are, so maybe you also tried what I am suggesting, ? Do a search on 'dpkg -reconfigure', that also is a option.
BEST :
Remove Ubuntu form the HD, install Debian, create the user you want, and be sure to type in the user name correctly, would work as well.

Thanks for your answer. Well, this is a Ubuntu VM, a virtual machine but my real OS is Buster, which I admit should've mentioned before and sorry about that, so basically this is the right forum for me, althought this is not a debian related question/issue and I understand if people refuse to jump in, so thanks again for doing it. There aren't any other users in the system, just one, me, moltke, the thing's when creating the VM and installing Ubuntu on it, when reached the step of creating my user I made a typo; I wrote moltle instead of moltke and that's what's shown in lightdm-greeter everytime I start and log in to the VM. Sorry I can't provide more details about the the things I've done but;
1. - I was using links2 while searching for some solution and it doesn't save anything so no history on that, or if there's any, I don't know how to get acces to it on Links2.
2. - Basically, the steps I mentioned above were most of the things I tried; editing lightdm's configuration files.
3. - When I first started the VM and logged in to Ubuntu, I open a terminal and noticed the name moltle at the prompt, this is how I know I made a typo when creating the user at the install process, I changed it so it shows moltke, in fact, the only place I ever see that name is in lightdm-greeter box and nowhere else in the system and can't figure out how to solve/change that. It's not big deal really, system works fine, it's more something I'd like to learn whether or not it can be fixed somehow other than reinstalling which I rather not.

trinidad
Posts: 299
Joined: 2016-08-04 14:58
Been thanked: 16 times

Re: Wrong username in lightdm-greeter

#4 Post by trinidad »

Hey Moltke. You should be able to change it easily if you have an existing /etc/lightdm/users.conf file and are not using a distro unique account service. Just add the new user name and #comment out the mistaken one. You can always change it back if a problem results. Don't know what DE situation your are in like XFCE, Cinnamon, Mate etc.

TC
You can't believe your eyes if your imagination is out of focus.

Moltke
Posts: 41
Joined: 2017-03-16 18:10

Re: Wrong username in lightdm-greeter

#5 Post by Moltke »

trinidad wrote:Hey Moltke. You should be able to change it easily if you have an existing /etc/lightdm/users.conf file and are not using a distro unique account service. Just add the new user name and #comment out the mistaken one. You can always change it back if a problem results. Don't know what DE situation your are in like XFCE, Cinnamon, Mate etc.

TC
Thanks for the reply. I installed awesome-wm, xfce and ukui on this VM. That's the thing, I can't delete that name because it only exists on lightdm-greeter box and nowhere else in the system, I've checked every single lightdm's configuration file and it's nowhere to be seen, isn't it weird that? I thought of uninstalling accountsservice since I read it's not a critical package, is that right? As I understand it, lightdm takes "orders" from its configuration files located at /usr and /etc respectively, unless, accounsservice is installed in which case it handles some other stuff I've not too clear which ones exactly, but yeah, while seraching for a possible solution I read some posts where they suggest to remove that pkg for lightdm to work properly. Can I safely remove that pkg?

EDIT: Hmm ... I just tried to remove accountssservice but doing so will also remove these packages: language-selector-common and ubuntu-standard, the latter seems to be neccesary for the system to work as expected, according to the output of

Code: Select all

apt-cache show ubuntu-standard
which explicitely says:
This package depends on all of the packages in the Ubuntu standard system.
This set of packages provides a comfortable command-line Unix-like
environment.
It is also used to make sure new updates are correct, removing this pkg is not recommended
I translated the last part about updates cause it shows in Spanish not English so maybe the actual wording is a bit different but the idea/concept behind it shouldn't be, which is, "do not remove this package unless you know exactly what you're doing ... or else". Well, I do know what I'm doing, I just don't know what doing it will do lol so I'll leave that alone for now.

Moltke
Posts: 41
Joined: 2017-03-16 18:10

Re: Wrong username in lightdm-greeter

#6 Post by Moltke »

Fixed it! :) Turns out it had nothing to do with lightdm. It occured to me to check /etc/passwd which

Code: Select all

man 5 passwd
tells
is a text file that describes user login accounts for the system.
So I open a terminal and typed

Code: Select all

cat /etc/passwd | grep 'moltle'
and there it was in the output

Code: Select all

moltke:x:1000:1000:moltle,,,:/home/moltke:/bin/bash
All I needed to do was edit the file

Code: Select all

sudo nano /etc/passwd
and change that line so it looks like this

Code: Select all

moltke:x:1000:1000:moltke,,,:/home/moltke:/bin/bash
reflecting my actual username and not that typo. It worked, I logged out/logged in and lightdm's greeter box now shows my current, actual username Image
It wasn't a big deal since the system works flawlessly but still, I wanted to know if that was a fixable thing and it is. So, you're welcome! :D

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: Wrong username in lightdm-greeter

#7 Post by Head_on_a_Stick »

Moltke wrote:

Code: Select all

cat /etc/passwd | grep 'moltle'
Congratulations, you have won this week's useless use of cat award!

For next time:

Code: Select all

grep 'moltle' /etc/passwd
Or even better:

Code: Select all

# pwck
^ That will check the integrity and validity of /etc/passwd for you.

How did you manage to have a typo in that file anyway? I do hope you aren't in the habit of editing such critical system files manually :shock:
deadbang

Moltke
Posts: 41
Joined: 2017-03-16 18:10

Re: Wrong username in lightdm-greeter

#8 Post by Moltke »

Head_on_a_Stick wrote:
Moltke wrote:

Code: Select all

cat /etc/passwd | grep 'moltle'
Congratulations, you have won this week's useless use of cat award!

For next time:

Code: Select all

grep 'moltle' /etc/passwd
Useless? Hmmm, it did work, so how come is useless? It wasn't for me.
Or even better:

Code: Select all

# pwck
^ That will check the integrity and validity of /etc/passwd for you.
Thanks for the tip! Really appreciated :)
How did you manage to have a typo in that file anyway? I do hope you aren't in the habit of editing such critical system files manually :shock:
If you'd bothered to read my previous post, you'd know that's not the case. Instead, you just skipped to the last one just to mock me becasue of my "useless use of cat" and again, that wasn't the case either. I admit it's a bit redundant but that's just the way I learnt how to use it and guess is hard to give up on old habits ;)

User avatar
dilberts_left_nut
Administrator
Administrator
Posts: 5346
Joined: 2009-10-05 07:54
Location: enzed
Has thanked: 13 times
Been thanked: 66 times

Re: (Solved) Wrong username in lightdm-greeter

#9 Post by dilberts_left_nut »

"inapropriate use of cat" was a meme decades before memes even existed.

I'm a regular abuser too - generally when catting various log files then up arrowing and tacking greps on the end to trim output - quicker than fussing about editing the front of the line, and the cats don't seem to mind ... :)
AdrianTM wrote:There's no hacker in my grandma...

CwF
Global Moderator
Global Moderator
Posts: 2681
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 41 times
Been thanked: 196 times

Re: (Solved) Wrong username in lightdm-greeter

#10 Post by CwF »

dilberts_left_nut wrote:I'm a regular abuser too
I'm not cool enough to do it on the command line so I made 'ask the cat' custom actions for thunar to probe things. So I poke around graphically. Even worse I sometimes 'echo' into stuff from thunar, just asking for it!

Post Reply