privateone commited on
Commit
01cbb15
·
verified ·
1 Parent(s): 009db59

Update start.sh

Browse files
Files changed (1) hide show
  1. start.sh +2 -2
start.sh CHANGED
@@ -38,7 +38,7 @@ start_ssh_service() {
38
  # Function to create 'admin' user if missing
39
  create_admin_user() {
40
  echo "* Creating 'admin' user *"
41
- useradd -m admin || { echo "Failed to create admin user"; exit 1; }
42
  echo "admin:password" | chpasswd || { echo "Failed to set admin password"; exit 1; }
43
  #echo "%sudo ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers || { echo "Failed to update sudoers"; exit 1; }
44
  }
@@ -47,7 +47,7 @@ create_admin_user() {
47
  fix_admin_permissions() {
48
  echo "* Fixing permissions for 'admin' user *"
49
  #chown -R admin:admin /home/admin || { echo "Failed to change ownership"; exit 1; }
50
- #chmod -R 777 /home/admin || { echo "Failed to set permissions"; exit 1; }
51
  }
52
 
53
  # Function to generate SSH keys for 'admin' user if missing
 
38
  # Function to create 'admin' user if missing
39
  create_admin_user() {
40
  echo "* Creating 'admin' user *"
41
+ #useradd -m admin || { echo "Failed to create admin user"; exit 1; }
42
  echo "admin:password" | chpasswd || { echo "Failed to set admin password"; exit 1; }
43
  #echo "%sudo ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers || { echo "Failed to update sudoers"; exit 1; }
44
  }
 
47
  fix_admin_permissions() {
48
  echo "* Fixing permissions for 'admin' user *"
49
  #chown -R admin:admin /home/admin || { echo "Failed to change ownership"; exit 1; }
50
+ chmod -R 777 /home || { echo "Failed to set permissions"; exit 1; }
51
  }
52
 
53
  # Function to generate SSH keys for 'admin' user if missing