Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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, BinaryMisfit Dec 9 '10 at 8:15

This question was marked as an exact duplicate of an existing 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 – RobotHumans 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 – RobotHumans Dec 8 '10 at 13:12

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

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