Locked Out Without Permissions

Asked by Balderdash

I've been using Linux/Ubuntu8.04 for about one month and have installed it as a single system with automatic booting directly to my desktop. I have not yet discovered how to use codes and even less what they mean.
Whilst trying to transfer my Thunderbird user profile from Windows to Ubuntu I realised that the matching folder in Ubuntu was hidden and that I would need to change my "Permissions" via the right-click "Properties" menu. All went well except that the "Tick" boxes do not show clearly whether they are "Ticked" (selected) or not. In trying to tick the appropriate options it seems that I did in fact remove all my permissions.

The consequences are that when the computer boots now have to enter my "Username" and "Password" only to discover that my session has been stopped after 10 seconds because I have no "Permissions" ! Of course, I cannot copy or print the details given but they do seem to concord with my "Permissions" theory. Trying to boot into the "Root" directory gives an erroneous "Incorrect password" message.

Does this mean that I should reformat my hard disk ad re-install an operating system? If that is the case I will probably go back to XP although I was getting to like Ubuntu and the only real criticism was the prolific use of "Dos" like commands which I have long since forgotten how to use.

Any help would be appreciated because a reasonable alternative to the "Money Grabbing Spy Community" is urgently needed and I'm a little reluctant to take a backward step !

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Balderdash
Solved:
Last query:
Last reply:
Revision history for this message
Johannes Pilkahn (j-pilkahn) said :
#1

In the GRUB menu select the second entry, "Recovery Mode".

Drop into a root shell and run 'chown -R USER:USER /home/USER/' where all three USER are placeholders for your username.

In case you're interested, the syntax is 'chown -R username:usergroup /path/to/folder'.
'chown' changes ownership of files. In single user setups, the groupname is your username. The '-R' makes the command recursive (applies it to subfolders also).

Also run 'chmod 664 /home/USER'.
'chmod' modifies permissions. In 'chmod XZY' X is owner's permissions, Y root's permissions, Z anyone elses. 6 is read/write, 4 is read only.

Reboot into normal Ubuntu. Done.

Revision history for this message
Balderdash (balderdash) said :
#2

Thanks for your help but I don't have access to the "GRUB" menu and I have no idea of how to "drop into a root shell" let alone running anything inside it.
I apologise for my ignorance but I guesswe are not really on the same planet? Perhaps it would be best if I scuttled back to Windows in search of foregiveness ?

Thanks anyway; your rapid response and clear instructions are appreciated and although beyond me, it does prove that you computer geeks are a very friendly bunch!

Revision history for this message
Johannes Pilkahn (j-pilkahn) said :
#3

We can work this out.

Lemme explain the instructions a bit more.

When you're computer boots, just after the screen came on, you see something like

   GRUB loading

   Stage 1.5

Right?

If you'd be dual booting with some other OS (Windows, another Linux distro) a menu would appear automatically. Hit the 'ESC' key to make it appear. Now choose "Recovery Mode"

If you're not in a root prompt right away, hit Alt+F1 to log in. If you're given menu options choose "Drop to root shell".

A command line prompt will appear.
Here, type

chown -R USER:USER /home/USER/

where USER is your username (the one you log-in with). Hit Enter.
Then type

chmod -R 664 /home/USER

again replacing USER by your username. Hit Enter.

Reboot into normal Ubuntu.

Revision history for this message
Balderdash (balderdash) said :
#4

I made it as far as the "Drop to shell" menu, but the following message asked for my "root password" which it promptly refused and recycled back to the previous menu. I also had an alternative option to "type Control-D" which I tried, both in letters and keys, all to no avail. In fact, after several attempts, it appears that the keyboard is unable to enter any text at this point.

Thanks for your perseverance, but just say the word and I'll slide back to more familiar territory

Revision history for this message
Johannes Pilkahn (j-pilkahn) said :
#5

In Recovery Mode root access should not be protected by a password.

This is very odd.

Rather than sliding back into more familar but maybe also less pleasing territory on the long run, why don't you simply reinstall once more?

Revision history for this message
Balderdash (balderdash) said :
#6

Perhaps I removed all my root permissions along with those of the user ?

Whatever, If I thought reinstalling Ubuntu could recover my personal files I would give it another go, but otherwise I'll wait until Linux buries its Dos type commands and goes 100% graphic.I'm too old to learn a new system and for myself the computer is not a passion but a tool I work twelve hours a day with. I like to keep the tools sharp but can't ignore productivity.

Many thanks

Revision history for this message
Johannes Pilkahn (j-pilkahn) said :
#7

Quoting Balderdash:
Perhaps I removed all my root permissions along with those of the user ?

Shouldn't be able to, but since you can drop into a root shell in Recovery Mode, you're system appears to be quite screwed. A reinstall would definitely be fast.

As far as recovering personal data is concerned, unless you had a separate /home partition, don't just install ontop of the old system. Boot from a LiveCD, backup data, then reinstall the OS of your choice.

I hope you'd give Ubuntu another go, as, unless you have to recover things, can be run 100% from the graphical environment quite well.

Revision history for this message
Balderdash (balderdash) said :
#8

Johannes,
I am really grateful for the efforts you have made on my behalf. Changing an OS is rather like changing schools, from being at the very top of the junior school one suddenly finds oneself at the very bottom of the high school. I've screwed up because I was trying to do to much too quickly but I have learnt a very valuable lesson. Namely, that Ubuntu is a very nice place to be and that the customer support service beats anything the Micro Mega Money Grabbers can offer.

Because of your encouragement Johannes, I'm going to reinstall Ubuntu and see what I can screw up next !

Very sincere thanks,
Balderdash

Revision history for this message
Johannes Pilkahn (j-pilkahn) said :
#9

Quoting Balderdash: Ubuntu is a very nice place to be and that the customer support service beats anything the Micro Mega Money Grabbers can offer
--> While that's pretty much absolutely true, the idea of "customer support" is a very corporate one.

Sure enough, Canonical Ltd. provides customer support for it's paying customers, but that's comparatively minute.

While a Windows user is in a customer relationship with Microsoft, an Ubuntu user is more or less part of a community that maintains various parts of his OS. I'll admit, that since there is no guaranteed warranty, there are downsides of this also (but really most EULAs don't give warranty either). On the upside, there is no limited amount of employed customer service agents, rather every user can add his bit to the community.

Quoting Balderdash:
Because of your encouragement Johannes, I'm going to reinstall Ubuntu and see what I can screw up next !
--> That's the right attitude!
+1