import psycopg2 as pgsql #for postgresql interaction
import subprocess as sp#no need to type that every time?
import logging
import os#used to find out what's in a certain directory


user = 'testme'
password = 'jake1998'
salt = 'fuckyou'
sp.call('#!/bin/bash','$password = ' + password ,'$user =' + testme,'$salt = ' + salt,'# Script to add a user to Debian/Ubuntu system ','if [ $(id -u) -ne 0 ]; then','  echo "Only root may add a user to the system" >&2','  exit 1','else','  read -p "Enter username : " username','  read -s -p "Enter password : " password','if /usr/bin/getent passwd "$username"; then','    echo "$username exists" >&2','    exit 2','  else','    if /usr/sbin/adduser --gecos '' --disabled-password "$username"; then','      echo "User $username has been added to system"','      salt=$(echo $RANDOM | /usr/bin/md5sum | /bin/dd bs=8 count=1 2>/dev/null)','      if ! /usr/sbin/usermod --password $(/usr/bin/mkpasswd -m sha-512 "$password" "$salt") "$username"; then','         echo "Failed to set password for user $username" >&2','      fi','    else','      echo "Failed to add user $username" >&2','    fi','  fi','fi')
@@ -180,303 +180,13 @@
 ry%0A%0A
-%0Auser = 'testme'%0Apassword = 'jake1998'%0Asalt = 'fuckyou'%0Asp.call('#!/bin/bash','$password = ' + password ,'$user =' + testme,'$salt = ' + salt,'# Script to add a user to Debian/Ubuntu system ','if %5B $(id -u) -ne 0 %5D; then','  echo %22Only root may add a user to the system%22 %3E&2','  exit 1','else','
+%22%22%22%0A%0A
   re
@@ -219,19 +219,17 @@
 username
-','
+%0A
   read -
@@ -261,19 +261,19 @@
 password
-','
+%0A  
 if /usr/
@@ -303,27 +303,25 @@
 rname%22; then
-','
+%0A
     echo %22$u
@@ -335,27 +335,25 @@
  exists%22 %3E&2
-','
+%0A
     exit 2',
@@ -354,20 +354,16 @@
 it 2
-','
+%0A
   else
-','
+%0A
     
@@ -427,27 +427,25 @@
 rname%22; then
-','
+%0A
       echo %22
@@ -484,19 +484,17 @@
  system%22
-','
+%0A
       sa
@@ -564,19 +564,17 @@
 ev/null)
-','
+%0A
       if
@@ -674,19 +674,17 @@
 e%22; then
-','
+%0A
         
@@ -740,19 +740,17 @@
  %3E&2
-','
+%0A
       fi
 ',' 
@@ -749,19 +749,17 @@
   fi
-','
+%0A
     else
 ',' 
@@ -754,19 +754,17 @@
     else
-','
+%0A
       ec
@@ -804,27 +804,34 @@
  %3E&2
-','
+%0A
     fi
-','
+%0A
   fi
-','fi'
+%0Afi%22%22%22%0Asp.call(%22%22
 )

append with args passable