Unable to "su" after installing Proftpd in Debian 6
I installed and configured Proftpd server on my Debian 6 system today.
It's a headless system and I am using SSH to connect. I can login as a normal user, But when I try to "su" to have root access I am getting below errros. "Cannot execute ftp: No such file or directory" Quote:
Quote:
Thanks |
How is proftpd configured?
What shell does root have ("grep root /etc/passwd") Do you have sudo, otherwise fixing might get troublesome... |
It's running as an inted service with one virtual user.
Sudo is not installed, shell for root user I haven't checked. I wasn't expecting this sort of an error while installing a pack, never faced any thing like this before. What all are my options? |
Start with checking root shell!
|
How do I get there without root access?
|
Could you do me a favour? That is, please read suggestions you get and follow them.
"grep root /etc/passwd" - it's in my first post in this thread. |
Oops sorry, I didn't notice that.
Quote:
|
That's just what I guessed!
See, the shell for root is now 'ftp'. It should be '/bin/bash/'. With that shell for root, and without sudo, you're in trouble! I don't know how it got wrong, probably you accidentally gave a wrong answer to a question. But ok, now we know the problem - let's find a solution. Quote:
Let me just hope that you actually can get to that machine physically - that is, either that you can plug in a keyboard & a monitor to it for a short while, or it's a virtualized machine and you control the host. If none of this is true... I don't know, have to do some serious thinking. But first, just to make sure (you ARE kind of a newbie, right? ;) ) Let's see if by chance 'sudo' is enabled. In a terminal, type "sudo df" - this is just to test! Probably you'll get something like "sudo - no such command", but if we're very very lucky sudo is there and you will be asked for your password. So, return with: 1) What did the 'sudo' command reply 2) Can you access the machine physically or 3) Is it virtualized, then who controls the host (the computer on which virtualization runs) If you don't understand something, just ask again! And the more detailed info you can give, the easier it is to help! |
No it's not virtualized, it's a physical system and by tomorrow I will have access to it once I reach home.
1) What did the 'sudo' command reply Quote:
Quote:
|
Quote:
What you do then is reboot the computer, boot from a live-cd (or any other system), access your debian-root and then change that line in /etc/passwd from root:x:0:0:root:/root:ftp to root:x:0:0:root:/root:/bin/bash ... and the reply "... $user is not in the sudoers file..." implies you do have sudo! But unfortunately your user is not a 'sudo-er' - and I guess you don't have any other user accounts on this system so it won't help you.(?) Gotta sleep now, it's night here in my part of the world. Looking forward to hear from you tomorrow! |
Thanks a lot for the help pingu...
Managed it without a live CD as there was option in GRUB to boot in "recovery mode" |
All times are GMT -5. The time now is 02:02 PM. |