i've written chmod 755 /etc/
and chmod 0644 /etc/
and now i find myself without access to anything,and inside the terminal where before there was username@system1:
now there's I have no name!@system1:
. I know i messed everything up,but there's a solution? a way to restore the default configuration? I Cannot reinstall,so i've to repair..
Asked
Active
Viewed 2,271 times
0

Azazel
- 15
1 Answers
2
Assuming you are running Linux with Grub as bootloader:
- Boot into Boot Linux Grub Into Single User Mode
- Login with the root account
- Execute
chmod 755 /etc
- Reboot the system
I'm not sure if you can go beyond point 2. If it's not possible to login as root (which in fact should be, since the process which asks you for your password should have access to the /etc
directory since it runs with uid 1) you need to boot from a live CD to execute step 3:
- Boot from live CD
- Mount the root file system of your operative UNIX system
- Change the permissions of
/etc
back to755

Manuel Faux
- 416
-
ok...i tried to enter as root,or in single user mod but that wasn't possible(black blank screen or a black screen with the cursor in a never-ending loading) so i tried to boot with live cd and also that DIDN'T WORK. I change the boot priority(first the cd,than at the second slot the hd) but the boot go on as i never inserted any cd...i'm really afraid that i mess badly with the sysstem... – Azazel Apr 05 '15 at 19:50
-
1That you cannot boot from your CD is for sure not related with the messed permissions. – Manuel Faux Apr 05 '15 at 19:58
-
Ok,i'm an idiot...the CD reader was half unplugged. However ,having Debian live cd,where i go to mount the root file system? i'm really sorry for my lack of knowledge – Azazel Apr 05 '15 at 20:10
-
It strongly depends on your setting: Do you use LVM? Do you use mdadm? Plain partition? – Manuel Faux Apr 05 '15 at 20:11
-
I've all the file in one partition(the default configuration)...the CD i'm using is the one from which i installed Debian. – Azazel Apr 05 '15 at 20:13
-
Try
mount /dev/sda1 /mnt
. If that works, you should see the/etc
directory of your faulty installation in/mnt/etc
. If that does not work, maybe printingfdisk -l /dev/sd*
might help to determine your setting. – Manuel Faux Apr 05 '15 at 20:20
passwd
file resides in/etc
. – Manuel Faux Apr 05 '15 at 19:03