Admin account doesn't work

Asked by Timo Kangas

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

Language:
English Edit question
Status:
Solved
For:
Ubuntu shadow Edit question
Assignee:
No assignee Edit question
Solved by:
Timo Kangas
Solved:
Last query:
Last reply:

This question was reopened

Revision history for this message
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.

Thanks

Revision history for this message
Timo Kangas (timo-kangas) said :
#2

Didn't help. Account opens only a shell.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

Can you give the output of:

sudo apt-get update

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

Thanks

Revision history for this message
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.

Thanks

Revision history for this message
Timo Kangas (timo-kangas) said :
#5

Still getting shell only.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#6

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

Revision history for this message
Timo Kangas (timo-kangas) said :
#7

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

br timo

Revision history for this message
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 : http://ubuntuforums.org/showthread.php?t=1613132

Thanks

Revision history for this message
Timo Kangas (timo-kangas) said :
#9

Hi

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

br. timo

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#10

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

Revision history for this message
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

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#12

Then try:

sudo service lightdm start

Revision history for this message
Timo Kangas (timo-kangas) said :
#13

Errormessage Job is alredy running

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#14

ok try pressing CTRL+ALT+F7

do you see the GUI?

Revision history for this message
Timo Kangas (timo-kangas) said :
#15

Nothing happen

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#16

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

Revision history for this message
N1ck 7h0m4d4k15 (nicktux) said :
#17

If you stop lightDM and start it again ?

+++++++++++++++++++
sudo service lightdm stop
sudo service lightdm start
+++++++++++++++++++

Thanks

Revision history for this message
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?

Revision history for this message
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.

Thanks

Revision history for this message
Timo Kangas (timo-kangas) said :
#20

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

br timo

Revision history for this message
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"
command.

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
+++++++++++
exit
+++++++++++

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.

Thanks.

Revision history for this message
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

Revision history for this message
Timo Kangas (timo-kangas) said :
#23

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

br timo

Revision history for this message
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.

++++++++++++++
exit
++++++++++++++

to exit from root's account.

Thanks

Revision history for this message
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

Revision history for this message
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"

Revision history for this message
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
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Thanks

Revision history for this message
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