Tell me more ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I accidentally deleted the /etc/shadow file while experimenting with commands (yeah a newbie!). Now I'm not being able to use sudo and after logging out not being able to login. This all is obvious. Then I created another crunchbang virtual machine, booted from it and mounted the virtual disk of the previous VM. Strangely I can see that the /etc/shadow file and also the 'shadow-' both are still present in the previous virtual disk. I again booted the older VM just to recheck but still not able to login. What is the problem???

Config : CrunchBang 10 as guest on Win7 32 bit using virtual box 4.1.8.

EDIT : Problem FIXED

BIG BLUNDER!!! The shadow was not there, just shadow-. Just copied /etc/shadow- to /etc/shadow then booted from the older VM. Boot successful!!!. Thanks for help and sorry for the unnecessary trouble.

Thanks.

share|improve this question
Permissions are correct? /etc/passwd also exists? – manatwork Mar 16 '12 at 13:39
Are you not able to login with any user, including root? – htor Mar 16 '12 at 13:40
@manatwork yes... – rsjethani Mar 16 '12 at 13:40
@hesse the debian system keeps root password blank...so IMHO you can never actually login as root. – rsjethani Mar 16 '12 at 13:41
1  
Empty password field means no password required to log in. To disable log in as the given user the password field should contain an invalid character, usually an ! or *. – manatwork Mar 16 '12 at 13:51
show 1 more comment

closed as too localized by Michael Mrozek Mar 16 '12 at 20:44

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, see the FAQ.

Browse other questions tagged or ask your own question.