Admin account doesn't work

Asked by Timo Kangas on 2012-09-02

I installed 12.04 LTS and my own (administration) account stopped to work. It worked ok for a while. When logging in it goes out immediatelly. Other accounts are working OK.

Question information

English Edit question
Ubuntu shadow Edit question
No assignee Edit question
Solved by:
Timo Kangas
Last query:
Last reply:

This question was reopened

N1ck 7h0m4d4k15 (nicktux) said : #1

Hello ,

Login from another user or guest account , open a terminal and apply this command

sudo chown username:username /home/username/.Xauthority

Where you see username in above command REPLACE it with you actual username from your corrupted account.


Timo Kangas (timo-kangas) said : #2

Didn't help. Account opens only a shell.

Can you give the output of:

sudo apt-get update

Your password will give no feedback, just type and hit ENTER


N1ck 7h0m4d4k15 (nicktux) said : #4

On 09/02/2012 06:21 PM, Timo Kangas wrote:
> Timo Kangas is still having a problem:
> Didn't help. Account opens only a shell.

Hello ,

 From the description of the problem , I understood that you have a
problem with .Xauthority

When you attempt to login and IMMEDIATELY logout , then (usually)
something is wrong with .Xauthority

So you must try to change the ownership of this file with above command
I gave you or you can remove .Xauthority (it will be re-created)

Try to remove it with this command

sudo rm /home/username/.Xauthority

Do not forget to replace username with your actual username , and do not
forget the dot .Xauthority is a hidden file inside your /home directory.

I placed sudo in the beginning of the command cuz you must do it from
another user account (or guest) . For a user to delete a file on another
user account, he must do it as admin. sudo gives you admin privileges.
As @actionparsnip mentioned , you will not see anything when you write
your password. This is normal.


Timo Kangas (timo-kangas) said : #5

Still getting shell only.

Can you give the output of my command please....

Timo Kangas (timo-kangas) said : #7

Ign precise InRelease
Ign stable InRelease
Ign stable InRelease
Ign precise InRelease
Ign precise-security InRelease
Get:1 stable Release.gpg [198 B]
Hit stable Release.gpg
Hit precise Release.gpg
Hit precise-security Release.gpg
Ign precise-updates InRelease
Get:2 stable Release
Hit stable Release
Hit precise Release
Hit precise-security Release
Hit stable/non-free i386 Packages
Hit precise/partner i386 Packages
Get:3 stable/main i386 Packages [1,244 B]
Hit precise-security/main Sources
Hit precise Release.gpg
Ign stable/non-free TranslationIndex
Ign precise/partner TranslationIndex
Ign stable/main TranslationIndex
Hit precise-security/restricted Sources
Hit precise-security/universe Sources
Hit precise-security/multiverse Sources
Hit precise-security/main i386 Packages
Hit precise-security/restricted i386 Packages
Hit precise-security/universe i386 Packages
Hit precise-security/multiverse i386 Packages
Hit precise-security/main TranslationIndex
Hit precise-security/multiverse TranslationIndex
Hit precise-security/restricted TranslationIndex
Hit precise-security/universe TranslationIndex
Hit precise-updates Release.gpg
Hit precise-security/main Translation-en
Hit precise-security/multiverse Translation-en
Hit precise-security/restricted Translation-en
Hit precise Release
Hit precise-security/universe Translation-en
Hit precise-updates Release
Hit precise/main Sources
Ign stable/main Translation-en_US
Ign stable/non-free Translation-en_US
Ign precise/partner Translation-en_US
Hit precise/restricted Sources
Ign stable/main Translation-en
Ign stable/non-free Translation-en
Ign precise/partner Translation-en
Hit precise/universe Sources
Hit precise/multiverse Sources
Hit precise/main i386 Packages
Hit precise/restricted i386 Packages
Hit precise/universe i386 Packages
Hit precise/multiverse i386 Packages
Hit precise/main TranslationIndex
Hit precise/multiverse TranslationIndex
Hit precise/restricted TranslationIndex
Hit precise/universe TranslationIndex
Hit precise-updates/main Sources
Hit precise-updates/restricted Sources
Hit precise-updates/universe Sources
Hit precise-updates/multiverse Sources
Hit precise-updates/main i386 Packages
Hit precise-updates/restricted i386 Packages
Hit precise-updates/universe i386 Packages
Hit precise-updates/multiverse i386 Packages
Hit precise-updates/main TranslationIndex
Hit precise-updates/multiverse TranslationIndex
Hit precise-updates/restricted TranslationIndex
Hit precise-updates/universe TranslationIndex
Hit precise/main Translation-en
Hit precise/multiverse Translation-en
Hit precise/restricted Translation-en
Hit precise/universe Translation-en
Hit precise-updates/main Translation-en
Hit precise-updates/multiverse Translation-en
Hit precise-updates/restricted Translation-en
Hit precise-updates/universe Translation-en
Fetched 2,789 B in 15s (177 B/s)
Reading package lists...

br timo

N1ck 7h0m4d4k15 (nicktux) said : #8

Hello ,
try to apply the nomodeset parameter in to the kernel via Grub and see
how will going.

See here a how-to :


Timo Kangas (timo-kangas) said : #9


this didn't help. Still opens on a shell as the other acoounts are ok.

br. timo

The admin account is fine, the apt-get command executed....

Timo Kangas (timo-kangas) said : #11

Account is more or less ok but x-don't start. When trying manually (startx) comes errormessage that no authority to run x

Then try:

sudo service lightdm start

Timo Kangas (timo-kangas) said : #13

Errormessage Job is alredy running

ok try pressing CTRL+ALT+F7

do you see the GUI?

Timo Kangas (timo-kangas) said : #15

Nothing happen

If you reinstall the lightdm package, does it help?
What video chip do you use?

N1ck 7h0m4d4k15 (nicktux) said : #17

If you stop lightDM and start it again ?

sudo service lightdm stop
sudo service lightdm start


Timo Kangas (timo-kangas) said : #18

I ttried both option without success. It has to something my admin account because other users' lightdm is working properly. Any good ideas?

N1ck 7h0m4d4k15 (nicktux) said : #19

On 09/03/2012 07:21 PM, Timo Kangas wrote:
> I ttried both option without success. It has to something my admin
> account because other users' lightdm is working properly. Any good
> ideas?

Hello , no further ideas from me.

Only option i can see now , is to create a new user and copy - move all
your important data , from old user (corrupted) to new user. Then ,
delete the old corrupted user.

If you want further assistance with above , let me know.


Timo Kangas (timo-kangas) said : #20

Challenge is that my only admin-acount is the problem one

br timo

N1ck 7h0m4d4k15 (nicktux) said : #21

On 09/03/2012 08:21 PM, Timo Kangas wrote:
> Challenge is that my only admin-acount is the problem one
> br timo

Hello ,

you can easily create another user with admin privileges with "adduser"

First of all you must login as root AND BE CAREFUL on what you are doing.

Login as root with below command in terminal or console mode

sudo -i

then use below command to create a user

adduser <username>

then use below command to add created user to sudo group (admin privileges)

adduser <username> sudo

Of course replace the <username> with the preferable username you want.

Then give this command to exit from root

and reboot your system to login from the new user. If everything works
good (for the new user) you can start copy files from the old
(corrupted) user to new user account.


Timo Kangas (timo-kangas) said : #22

Done that. But after copying the files from old account the owner is root and when trying to chmod or chown system says that I'm not allowed to run the command for there directories:

sudo chown user:user *

br timo

Timo Kangas (timo-kangas) said : #23

I did the chmod with old admin user and it worked.

br timo

N1ck 7h0m4d4k15 (nicktux) said : #24

On 09/04/2012 11:06 AM, Timo Kangas wrote:
> I did the chmod with old admin user and it worked.

Hello ,

thats good news.

Now that everything works Ok , you can delete the old user but first ,
confirm that the new user has admin privileges by connecting as root
with bellow command

sudo -i

with the new user's password.


to exit from root's account.


Timo Kangas (timo-kangas) said : #25

Account more or less working, except sudo -i gave message user not allowed to run root in this laptop. Still haven't been able to recover evoluion offline folders from previous account

N1ck 7h0m4d4k15 (nicktux) said : #26

.......and I think will be good to mark the question solved by an answer.

Future users with same question will find the answer(that solved your problem) more easily.

You can do it from "edit question"

N1ck 7h0m4d4k15 (nicktux) said : #27

Did you run the command

useradd <username> sudo

it wants root privileges above command. Connect as root with old user's password.

If you did but not worked , then try bellow command (again with admin privileges)

usermod -a <username> -G adm,cdrom,sudo,dip,plugdev,lpadmin,sambashare


Timo Kangas (timo-kangas) said : #28

I edited manually /etc/group and added username to admin. mostlikely 1st group should be admin instead of adm. Solved, thanx a million