Commit 8732f735 authored by Jondy Zhao's avatar Jondy Zhao

remove sshd from all the configure scripts

parent 91757c4a
...@@ -88,7 +88,7 @@ for _name in $(NET USER) ; do ...@@ -88,7 +88,7 @@ for _name in $(NET USER) ; do
if [[ "${_name}" == ${slapos_user_basename}* ]] ; then if [[ "${_name}" == ${slapos_user_basename}* ]] ; then
echo "Removing user: ${_name}" echo "Removing user: ${_name}"
NET USER ${_name} /DELETE && echo OK. NET USER ${_name} /DELETE && echo OK.
elif echo "${_name}" | grep -q -E "(sshd)|(cyg_server)|(${slapos_administrator})" ; then elif echo "${_name}" | grep -q -E "(cyg_server)|(${slapos_administrator})" ; then
echo "Removing user: ${_name}" echo "Removing user: ${_name}"
NET USER ${_name} /DELETE && echo OK. NET USER ${_name} /DELETE && echo OK.
fi fi
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
# #
# * Create user slaproot who owns Administrator group rights # * Create user slaproot who owns Administrator group rights
# #
# * Configure and start cygwin service: cygserver, syslog-ng, sshd # * Configure and start cygwin service: cygserver, syslog-ng
# #
# * config: Create node and client configure file by parameters ca/key # * config: Create node and client configure file by parameters ca/key
# #
...@@ -166,7 +166,7 @@ slapos_check_and_create_privileged_user ${_administrator} ${_password} || ...@@ -166,7 +166,7 @@ slapos_check_and_create_privileged_user ${_administrator} ${_password} ||
csih_error "failed to create account ${_administrator}." csih_error "failed to create account ${_administrator}."
# ----------------------------------------------------------- # -----------------------------------------------------------
# Configure cygwin services: cygserver syslog-ng sshd # Configure cygwin services: cygserver syslog-ng
# ----------------------------------------------------------- # -----------------------------------------------------------
csih_inform "Starting configure cygwin services ..." csih_inform "Starting configure cygwin services ..."
if ! cygrunsrv --query ${cygserver_service_name} > /dev/null 2>&1 ; then if ! cygrunsrv --query ${cygserver_service_name} > /dev/null 2>&1 ; then
......
...@@ -559,7 +559,7 @@ create_user() { ...@@ -559,7 +559,7 @@ create_user() {
echo echo
echo "Attempting to find or create a privileged user." echo "Attempting to find or create a privileged user."
for username in ${slapos_administrator} cyg_server cron_server sshd_server for username in ${slapos_administrator} cyg_server cron_server
do do
if net user "${username}" 1> /dev/null 2>&1; then if net user "${username}" 1> /dev/null 2>&1; then
[ -z "${first_account}" ] && first_account="${username}" [ -z "${first_account}" ] && first_account="${username}"
...@@ -634,8 +634,6 @@ create_user() { ...@@ -634,8 +634,6 @@ create_user() {
if [ "${username_in_admingroup}" != "yes" ] if [ "${username_in_admingroup}" != "yes" ]
then then
echo "ERROR: Adding user ${username} to group ${_admingroup} failed!" echo "ERROR: Adding user ${username} to group ${_admingroup} failed!"
echo "Please add ${username} to group ${_admingroup} before"
echo "starting the sshd service!"
echo echo
ret=1 ret=1
fi fi
......
...@@ -50,7 +50,6 @@ declare -r slapos_user_basename=${slapos_prefix:-slap}user ...@@ -50,7 +50,6 @@ declare -r slapos_user_basename=${slapos_prefix:-slap}user
declare -r slapos_ifname=${slapos_prefix}re6stnet-lo declare -r slapos_ifname=${slapos_prefix}re6stnet-lo
declare -r re6stnet_service_name=${slapos_prefix}re6stnet declare -r re6stnet_service_name=${slapos_prefix}re6stnet
declare -r cron_service_name=${slapos_prefix}cron declare -r cron_service_name=${slapos_prefix}cron
declare -r sshd_service_name=${slapos_prefix}sshd
declare -r syslog_service_name=${slapos_prefix}syslog-ng declare -r syslog_service_name=${slapos_prefix}syslog-ng
declare -r cygserver_service_name=${slapos_prefix}cygserver declare -r cygserver_service_name=${slapos_prefix}cygserver
......
...@@ -61,7 +61,7 @@ fi ...@@ -61,7 +61,7 @@ fi
# Routine: create_unprivileged_user # Routine: create_unprivileged_user
# Creates a new (unprivileged) user as specified by $1. # Creates a new (unprivileged) user as specified by $1.
# Useful for running services that do not require elevated privileges, # Useful for running services that do not require elevated privileges,
# or running servers like sshd in "privilege separation" mode. # or running servers like cron in "privilege separation" mode.
# #
# Exits on catastrophic error # Exits on catastrophic error
# Returns 0 on total success # Returns 0 on total success
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment