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.

  • 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 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 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 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.


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