Browse Source

Removed comments to actually make the scripts work

Théo Ertzscheid 2 years ago
parent
commit
adaa1180f5
3 changed files with 4 additions and 4 deletions
  1. 1 1
      addtogroups
  2. 1 1
      createperson
  3. 2 2
      person2posix

+ 1 - 1
addtogroups

@@ -27,7 +27,7 @@ for g in $@; do
     if group_exists $g ; then
         echo "$group" | sed \
             -e "s/%GROUP%/$g/" \
-            -e "s/%UID%/$uid/" #| $MODIFY_CMD
+            -e "s/%UID%/$uid/" | $MODIFY_CMD
     else
         echo "Group $g does not exist, skipping..."
     fi

+ 1 - 1
createperson

@@ -21,7 +21,7 @@ cn: $gn $sn
 mail: $uid@$DOMAIN
 userPassword: $pw"
 
-echo "$user" #| $ADD_CMD
+echo "$user" | $ADD_CMD
 
 read -p "User added. Do you want to add them to groups ? [o/N] " a
 

+ 2 - 2
person2posix

@@ -46,10 +46,10 @@ uidnumber=$(( $(slapcat | grep 'gidNumber: 2' | cut -d' ' -f2 | sort -u | tail -
 # add the necessary attribbute for a posixAccount
 echo "$user" | sed \
 	-e "s/%NUMBER%/$uidnumber/" \
-	-e "s/%UID%/$uid/" #| $MODIFY_CMD
+	-e "s/%UID%/$uid/" | $MODIFY_CMD
 
 # create a posic group with the same name and uid as the user
 # and add them to it
 echo "$group" | sed \
 	-e "s/%NUMBER%/$uidnumber/" \
-	-e "s/%UID%/$uid/" #| $ADD_CMD
+	-e "s/%UID%/$uid/" | $ADD_CMD