LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-16-2013, 05:34 AM   #1
tux75
LQ Newbie
 
Registered: Feb 2009
Posts: 16

Rep: Reputation: 0
Smile 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:
$ su
Password:
Cannot execute ftp: No such file or directory
$
$
$ su root
Password:
Cannot execute ftp: No such file or directory
$
$
If I give a wrong password for the root user it does recognise that.

Quote:
$ su
Password:
su: Authentication failure
$

Thanks
 
Old 02-16-2013, 06:04 AM   #2
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Rep: Reputation: 127Reputation: 127
How is proftpd configured?
What shell does root have ("grep root /etc/passwd")
Do you have sudo, otherwise fixing might get troublesome...
 
Old 02-16-2013, 03:43 PM   #3
tux75
LQ Newbie
 
Registered: Feb 2009
Posts: 16

Original Poster
Rep: Reputation: 0
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?
 
Old 02-16-2013, 03:55 PM   #4
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Rep: Reputation: 127Reputation: 127
Start with checking root shell!
 
Old 02-16-2013, 04:00 PM   #5
tux75
LQ Newbie
 
Registered: Feb 2009
Posts: 16

Original Poster
Rep: Reputation: 0
How do I get there without root access?
 
Old 02-16-2013, 04:05 PM   #6
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Rep: Reputation: 127Reputation: 127
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.
 
Old 02-16-2013, 04:13 PM   #7
tux75
LQ Newbie
 
Registered: Feb 2009
Posts: 16

Original Poster
Rep: Reputation: 0
Oops sorry, I didn't notice that.

Quote:
$ grep root /etc/passwd
root:x:0:0:root:/root:ftp
$
How could this get changed?
 
Old 02-16-2013, 04:30 PM   #8
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Rep: Reputation: 127Reputation: 127
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:
Originally Posted by tux75 View Post
"t's a headless system and I am using SSH to connect."
This is bad. Really bad.
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!
 
Old 02-16-2013, 05:08 PM   #9
tux75
LQ Newbie
 
Registered: Feb 2009
Posts: 16

Original Poster
Rep: Reputation: 0
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:
$user is not in the sudoers file. This incident will be reported.

Quote:
I don't know how it got wrong, probably you accidentally gave a wrong answer to a question.
Well this could be possible, I think I issued "chsh". Need to check the history once I get back the root access.
 
Old 02-16-2013, 05:17 PM   #10
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Rep: Reputation: 127Reputation: 127
Quote:
Originally Posted by tux75 View Post
No it's not virtualized, it's a physical system and by tomorrow I will have access to it once I reach home.
Very good!
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!
 
Old 02-18-2013, 03:14 PM   #11
tux75
LQ Newbie
 
Registered: Feb 2009
Posts: 16

Original Poster
Rep: Reputation: 0
Thanks a lot for the help pingu...

Managed it without a live CD as there was option in GRUB to boot in "recovery mode"
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
unable to replace "ö" to "p" in shell scripting with "sed" meninmech Programming 5 06-22-2012 03:58 PM
Unable to boot Debian : "PANIC : Double fault" Thomaz Linux - Newbie 11 08-01-2010 07:08 PM
Unable to "scanimage": "invalid argument” in Debian 4.0 sonichedgehog Linux - Newbie 3 12-02-2007 03:31 PM
LXer: Installing Debian Etch From A Windows System With "Debian-Installer Loader" LXer Syndicated Linux News 0 09-28-2007 01:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration