SSH user to be add to the box.

malmarri

Verified User
Joined
Jan 8, 2005
Messages
5
Hi,

I have DirectAdmin 1.23.3 installed one Fedora Core2, and i would like to add a user with ftp and ssh right to the box same as root but with less rights.

When I add the user wiht DirectAdmin as admin or a user, I can get the ftp and ssh, but if I add it by Webmin or form shell I can not access the box.

I would like your help.

:confused:
 
Last edited:
Although I'm not sure (as you're using FC2, while I use FreeBSD but logically should be the same), when you add the user through DirectAdmin, it also adds 'AllowUser <username>" on /etc/ssh/sshd_config which allows user to SSH to the box. While when you add someone via Webmin or adduser (or useradd in Linux), it doesn't add that record so the result is that the user cannot SSH to the box. What you can do, is to manually add users on /etc/ssh/sshd_config and kill -HUP your ssh daemon.

(NOTICE: Don't take the following paragraph as a recommendation)
I have another way, but it's not recommended unless you know what you're doing and knowing that it may break some DA functions (like allow/disallow shell access). Whenever a server owner requests me to be able to add shells directly without adding them to /etc/ssh/sshd_config, I prevent DA from touching sshd_config with the following way: a) creating a fake file (touch /etc/ssh/sshd_config_directadmin), b) editing /usr/local/directadmin/conf/directadmin.conf and setting sshdconfig= to the fakefile, c) editing /etc/ssh/sshd_config and removing all AllowUser records, d) Restarting DirectAdmin (/usr/local/directadmin/scripts/boot.sh restartd), e) kill -HUP'ing sshd and from now on all shell accounts are getting added fine with no worries for AllowUser records.

Good Luck ;)
 
hi,

I have tryed both ways but no luk.

I am still can not login, it is still acts as nothing have been changed to sshd_config file.

I am still stuck, ples help me.

:confused:
 
SIGHUP doesn't restart sshd. It only reloads the parameters.

Try an actual restart and see if it makes a difference.

Jeff
 
I did as psyxakias suggested, went into webmin, applies the changes, restarted the server and everything works well. Thank you for the posts everyone.

Question:

Next time DA writes to this file will this change be overwritten and this addition lost?
 
Back
Top