LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   Ubuntu 11.10 cannot login and cannot shut down (https://www.linuxquestions.org/questions/ubuntu-63/ubuntu-11-10-cannot-login-and-cannot-shut-down-907558/)

Cushie 10-11-2011 05:57 AM

Ubuntu 11.10 cannot login and cannot shut down
 
I have just upgraded 11.04 to the latest daily version of 11.10 (Beta2+)using Update manager on my Acer Aspire One netbook. I got many hangups and errors so I reinstalled the upgrade option again from live usb. I have keept my original separate 'home' directory and username. I chose auto login during the install which did not succeed but get to a login screen yet I cannot login to my usename or shut down but I can login a guest.

I reset the 'passwd' just in case, then did another reinstall to make sure I was using the correct password (same one I have always used) but still cannot login or shut down.
Is there a simple fix to reconfigure or reinstall something to get over this problem. Suggestions would be appreciated (I have tried Ubuntuforums but got no reply).

BTW I can get to # prompt terminal via recovery option and I can login to a terminal with 'username' and password, so I know they are correct, this allows me to list the home directory and all the files are intact. As a point of interest what command would run the desktop manager gdm (not installed)? startx (another hangup)? or something new to 11.10?

{BBI}Nexus{BBI} 10-11-2011 11:33 PM

Have you checked who owns the files in your home directory? It might just be an ownership issue. You could try running
Code:

sudo chown -R <username here:username here>

Make sure you are in your home/username directory before running the above command
.

Cushie 10-12-2011 01:07 PM

Thanks Nexus I can get to # root prompt (from recovery mode).
I can log in as username/passwd.
My home directory is /dev/sda6/home/username. I have tried some commands and get an error read only file system, so the problem is here somewhere.

I can get the $ prompt after login 'username' and then password. If I do ls -l I get a list of / directory and if I cd /home and ls -l I get 0 ie empty. So that home is not my original home.

I am a little stuck here. How do I change directory into /dev/sda6/home? or /dev/sda6/home/username (I get not a directory) before I try 'chown'?

Could you please point me in the right direction? Thanks

{BBI}Nexus{BBI} 10-12-2011 03:01 PM

This might be a difficult for you to do, but can you do:
Code:

sudo fdisk -l
then post the result here.

The way to log out via commandline is:
Code:

sudo shutdown -h now or poweroff

Cushie 10-13-2011 11:45 AM

Using Oneiric usb live disk:
cd /media/Home then ls -ld gives drwxr-xr -x root root 4096 2011-08-03 15:46
ls -l gives drwx------ 3 root root etc.... lost+found
drwxr -xr -x 90 1000 1000 etc....myname
cd myname
ubuntu@ubuntu:/media/Home/myname$ sudo chown -R myname:myname
chown: missing operand after `myname:myname'


ubuntu@ubuntu:~$ sudo fdisk -l

Disk /dev/sda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders, total 234441648 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000600c2

Device Boot Start End Blocks Id System
/dev/sda1 * 63 9218047 4608992+ 83 Linux
/dev/sda2 100358055 102462569 1052257+ 82 Linux swap / Solaris
/dev/sda3 9221371 100358054 45568342 5 Extended
/dev/sda4 102462570 234436544 65986987+ 83 Linux
/dev/sda5 9221373 29704184 10241406 83 Linux
/dev/sda6 29704248 100358054 35326903+ 83 Linux


sda5 is / and sda6 is Home for Ubuntu
Hope this helps, nearly there, many thanks

knulp79 10-14-2011 09:15 AM

I had the same issue.
There was a .Xauthority file in my home folder owned by root and that prevented me from logging in.
Logging in a text console (Alt+Ctrl+F1 at the login screen) and issuing:
sudo rm ~/.Xauthority
solved the issue.
I hope it helps.

pankajso 10-15-2011 01:55 AM

@knulp79, Thanks .. It solved my problem

kkorbz 10-15-2011 03:17 PM

Thanks knulp! This was my issue as well. Once I rm'd it I was in and everything works like a charm. Darn Xauthority file. Who's the SU on this box...oh me!

Quote:

Originally Posted by knulp79 (Post 4498410)
I had the same issue.
There was a .Xauthority file in my home folder owned by root and that prevented me from logging in.
Logging in a text console (Alt+Ctrl+F1 at the login screen) and issuing:
sudo rm ~/.Xauthority
solved the issue.
I hope it helps.


karatedog 10-17-2011 04:20 AM

Thanks knulp79!

lvcosme 10-17-2011 06:12 PM

I left my computer and 20 min later when I came back, my password did not work anymore. I tried everything you guy mentioned and did not solved. Gonna format it againnnnnnnnnnnnn. why did I upgrade.... The problem is not formatting, the problem is losing everything.

countach74 10-18-2011 01:12 AM

Don't jump the gun on reformatting. It's likely a simple permissions issue. It's easy to overlook things; if you are worried about losing everything, by all means, wait for more help. :)

Could you run the following groups of commands, posting the output of each?

Code:

cd /home
ls -la

Code:

cd /home/{your user id}
ls -la

Code:

grep {your user id} /etc/passwd

lvcosme 10-18-2011 10:08 AM

Code:

cd /home
ls -la

drwxr-xr-x 5 root root 4096 2011-10-17 15:40 .
drwxr-xr-x 25 root root 4096 2011-10-14 11:33 ..
drwxr-xr-x 54 koala2 koala2 4096 2011-10-17 14:29 koala2
drwxr-xr-x 2 root root 4096 2011-10-17 15:40 netlogon
drwxrwxrwx 2 root nobody 4096 2011-10-17 15:40 pdf-documents


Code:

cd /home/{your user id}
ls -la

there are lots of files, but
-rw------- 1 koala2 koala2 50 2011-10-17 14:29 .Xauthority

Can't delete it tho, it says ready-only file system


Code:

grep {your user id} /etc/passwd
koala2:x:1000:1000:Slotmanlab,,,:/home/koala2:/bin/bash

I had to use to recovery mode to get it. The alt ctrl F1 works but then the passwd that I enter cannot be authenticated. Well I have a backup from yesterday. What takes time is to install/configure all software that I use for some analysis. I can create a new user too. I think I got this problems while setting up a ftp server.
Thank you

countach74 10-20-2011 01:06 AM

Why is your filesystem read only? Dirty shut down? I would recommend booting to a live CD/USB such as Knoppix and running:

e2fsck -f /dev/[your boot drive (or home drive, if it's on a separate partition)]

CAUTION: make sure the boot drive is NOT mounted or the command WILL break your system.

Once the check is done, mount the filesystem and remove the .Xauthority file:

mount /dev/[your boot drive (or home drive, if it's on a separate partition)] /mnt
cd to your home directory and rm .Xauthority

You can skip the e2fsck command if you want, most likely.. it's just a safety to make sure that your partition doesn't have any errors before you go make changes. You should now be able to reboot and login again.

{BBI}Nexus{BBI} 10-20-2011 10:23 PM

Quote:

Originally Posted by lvcosme (Post 4500916)
The problem is not formatting, the problem is losing everything.

The 3 B's. BackUp, BackUp, BackUp.

nh_linux 10-22-2011 12:52 PM

Hello all.

I just upgraded from Ubuntu 11.04 to 11.10 today and I'm having issues.

1) Ubuntu won't shut down even with the shutdown and poweroff commands.This is the only problem I have so far. I can login to my account with no problem.I attempted to change the session so I can boot into an older version of Ubuntu but it doesn't happen.From the commandline here's the input/output from my attempt to shut down :

elothas@Inspiron-530s:~$ poweroff
poweroff: Need to be root
elothas@Inspiron-530s:~$ shutdown
shutdown: time expected
Try `shutdown --help' for more information.
elothas@Inspiron-530s:~$ shutdown -h
shutdown: time expected
Try `shutdown --help' for more information.
elothas@Inspiron-530s:~$

I don't know what "time expected" means.

2) I found another glitch. Parcellite doesn't load.

So far I see that "freedom is restricted" in this version of Ubuntu. Linux is supposed to be about freedom.

Suggestions will be appreciated.Thanks.


All times are GMT -5. The time now is 07:52 AM.