Services displayed STOOPED even if their work good

MagnuM

Verified User
Joined
Oct 24, 2003
Messages
102
Location
Romania
I have just singup with tektonic.net, and there is a problem with sshd and vm-pop3d. Those 2 programs are working good but DA shows them as non working services. The operating system is Fedora Core 1, and there si Virtuozzo used for setting up the VPS.
Can someone tell me what is happening?
Thanks, Raul.
 
They sure do, but I don't know what is happening but sshd appears now as running and vm-pop3d not.

Please tell what should I do, so DA to show me vm-pop3d as a running service?
 
Hello,

If vm-pop3d is running through xinetd, then it won't show as running. This is normal. If the vm-pop3d line in the /usr/local/directadmin/data/admin/services.status file is set to OFF, then there is nothing to worry about. Xinetd would handle the incoming connections, and then load up vm-pop3d to run only when connections are made on a per-connection basis.

If it's setup to use xinetd, you won't see it as running.

John
 
OK ther 2 problems here.

1. SSHD appears as running only when some sesson is open (with the PID there), else is appaears stopped, even if is running. How can I make to show it there in DA Services Info the correctely status.

2. in /usr/local/directadmin/data/admin/services.status MySQL appears to be OFF, but appears as running in DA Services Info. What does it mean the OFF from there?

Thanks.
 
Hello,

1) I would then assume that the sshd isn't runing as a daemon and is being started by xinetd. xinetd is the daemon which starts sshd for each connection that comes in. If you want it to show up as running all the time, then you'd need to set it to run as a deamon instead of through xinetd.

2) The "OFF" in that file only means that the DirectAdmin Task Queue won't be looking for it to restart if it's down. You can still run it, start/stop it, whatever you want but the taskq won't touch it if it's OFF.

John
 
Hello,

1) enable telnet
2) login via telnet and disable ssh from xinetd (set disabled=yes in /etc/xinetd.d/sshd (?))
3) restart xinetd so that port 22 is not being used.
4) type "service sshd start" and "chkconfig sshd on"
5) test loging into ssh (make sure it works after a reboot) and then disable telnet.

John
 
While it might be a good idea to have a telnet window running while changing between ssh/xinetd and ssh/daemon, it's not necessary.

Once your ssh connection is running, it's running. Changes will affect only future sessions.

Yes, tested, though you might want to test it yourself.

Jeff
 
Actually I just don't know why I can't connect with the root user, only with other users with telnet?
 
Actually I have done everything you say but all what the command you told me to enter chkconfig sshd on is to put again disable=no in /etc/xinetd.d/sshd.
Is there another way to make sshd to run as a deamon?
Thanks.
 
MagnuM said:
Actually I just don't know why I can't connect with the root user, only with other users with telnet?

Direct root login disabled? Check the guide in the checklist and reverse it ;)

Chris
 
MagnuM said:
Actually I have done everything you say but all what the command you told me to enter chkconfig sshd on is to put again disable=no in /etc/xinetd.d/sshd.
Is there another way to make sshd to run as a deamon?
Thanks.

/etc/xinetd.d/sshd (file)

switch disable=no to disable=yes

save the file

then run the seperate command

chkconfig sshd on

Is that what you're doing?
 
Yes this is what I do:

# pico /etc/xinetd.d/sshd

Change to disable = yes and save the file (I also chacke if was saved by open it again)

# service xinetd restart

# chkconfig sshd on

And after that if I make # pico /etc/xinetd.d/sshd again, it appears there disable = no. Don't know what is happening, but this it.
 
edit /etc/xinetd.d/sshd

then try:
service xinetd stop
service sshd start
service xinetd start

And check it again ;)

Chris
 
Byt the way, I forgot to tell you, I have done this from SSH, because in Telnet I simply don't have the command service or chkconfig.

I have loged with telnet as a normal user an the type su and password, but it seems that those commands does not exist when logged with Telnet.

Do you think this is the problem.

The point is when I hit chkconfig sshd on then the file is modified to disable=no.
 
MagnuM said:
Byt the way, I forgot to tell you, I have done this from SSH, because in Telnet I simply don't have the command service or chkconfig.
First of all, always use ssh; never use telnet; it passes your passwords, including your root password when you use su, in cleartext. I've you've ever logged in using telnet, now is the time for you to change your passwords.
I have loged with telnet as a normal user an the type su and password, but it seems that those commands does not exist when logged with Telnet.
All the commands that exist with ssh exist with telnet, and vice-versa.

The problem is you're using su when you should be using su -.

The former doesn't change your default path to root's path; the latter does. If you're not using root's path, then you must type in the complete path of many programs that are only to be executed by root. For example, /sbin/service would have worked.
Do you think this is the problem.
No.
The point is when I hit chkconfig sshd on then the file is modified to disable=no.
You should probably delete the entire sshd file from the /etc/xinetd.d directory (of course don't delete it completely, but rather move it somewhere else for safekeeping; this will work:

mv /etc/xinetd.d/sshd /root/save-sshd

Then try:

service xinetd stop
service sshd stop
service sshd start
service xinetd start


(Note that some of the above may result in errors; that's okay.)

Then, to make sure sshd will start every time you reboot, check to see if it's set up to start properly:

ls -al /etc/rc.d/rc3.d/???sshd

What you should see is a symbolic link beginning with either S or K, then two numerical digits, then "sshd".

If it begins with S you're okay. If it begins with K, do this (as root):


cd /etc/rc.d/rc3.d
mv Kxxsshd Sxxsshd


where xx must be replaced by those two numerical digits.

If ls -al /etc/rc.d/rc3.d/???sshd doesn't return anything at all then you'll need to create a symbolic link:

cd /etc/rc.d/rc3.d
ln -s ../init.d/sshd S55sshd

Now sshd should work as a daemon.

Jeff
 
Sorry for my delay, I was out of town.

I do not have any sshd in /etc/init.d or /etc/rc.d/rc3.d only sshd-keygen in both of them.

Do I need to make a symbolic link in /etc/init.d from /usr/sbin/sshd and then another symbolic link in /etc/rc.d/rc3.d from /etc/init.d ?
 
Now I have done this:

mv /etc/xinetd.d/sshd /root/sshd

ln -s /usr/sbin/sshd /etc/init.d/sshd

ln -s /etc/init.d/sshd /etc/rc3.d/S85sshd

But sshd seems not to start so I put it again on xinetd.
 
Just to add my 2c, I have a VDS with Tektonic.net for use as a backup server (slave DNS, backup mx relay etc) and they've been great.

Matt :)
 
Back
Top