Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Possible Duplicate:
debian login problem.

when i logging with root then i saw message "permission denied" Then i changed root shell directory "usermod -s .usr/ root" but it says "permission denied" again. what is the default shell directory, or what can i do for change permissions.

share|improve this question

marked as duplicate by Sathya, Diago Dec 9 '10 at 8:15

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
if u r logged in as root you should never see permission denied because of access control...it could be a something in use problem, but i'm not sure what we're seeing/asking. maybe a little more detail –  hbdgaf Dec 8 '10 at 13:02
    
i logged with root but i see permission denied message. maybe changed root group permissions or another problems. but i don't know. i can login user mode only. if i login normal mode with root account, i see "Cannot execute /usr/ permission denied" message –  Sonat Alpagut Dec 8 '10 at 13:07
    
can you log in with a regular user and su to root? debian might have gotten around to disabling root login like ubuntu and some other distros do. is this local or ssh? ssh root logins are almost always disabled...again i doubt it's filesystem permissions –  hbdgaf Dec 8 '10 at 13:12
add comment

1 Answer

If you ran usermod -s /usr/ root as root then you have set root's shell to be the usr directory, which is invalid and will not work. /usr/ is a directory, not an executable. If you actually ran usermod -s .usr/ root then you probably set root's shell to a nonexistent file, which is invalid and will not work. You should have said usermod -s /usr/bin/ksh root or some other actual executable.

If you can log in as a regular user you can run

su -s /bin/sh root -

Which will get you in as root with a working shell. From there you can fix your assigned shell with usermod.

And remember to take care in the future when working as root. Most commands assume you know what you're doing and that you won't make any mistakes.

share|improve this answer
    
it works fine, thanks –  Sonat Alpagut Dec 9 '10 at 21:58
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.