iSolutions Lookup
SCRIPTING
Ask
Enter iSolutions Username or Student ID

Provided Input
VARIABLES
Add
Provided Input
to
Username
TEXT
Match
[a-zA-Z]+
in
Username

Matches
SCRIPTING
If
Matches
has any value
TEXT
username=$(echo
Username
| xargs);
input=$(ldapsearch -LLL -H ldaps://nlbldap.soton.ac.uk -b "ou=user,dc=soton,dc=ac,dc=uk" "cn=$username" -x);
echo "$input" | grep "displayName:" | sed 's/displayName: //';
echo "$input" | grep "sAMAccountName:" | sed 's/sAMAccountName: //';
echo "$input" | grep "employeeNumber:" | sed 's/employeeNumber: //';
echo "$input" | grep "mail:" | sed 's/mail: //';
echo "$input" | grep "department:" | sed 's/department: //';
echo "$input" | grep "X400"
# echo "$input";

Text
VARIABLES
Set variable
Script
to
Text
SCRIPTING
Otherwise
TEXT
username=$(echo
Username
| xargs);
input=$(ldapsearch -LLL -H ldaps://nlbldap.soton.ac.uk -b "ou=user,dc=soton,dc=ac,dc=uk" "employeeNumber=$username" -x);
echo "$input" | grep "displayName:" | sed 's/displayName: //';
echo "$input" | grep "sAMAccountName:" | sed 's/sAMAccountName: //';
echo "$input" | grep "employeeNumber:" | sed 's/employeeNumber: //';
echo "$input" | grep "mail:" | sed 's/mail: //';
echo "$input" | grep "department:" | sed 's/department: //';
echo "$input" | grep "X400"
# echo "$input";

Text
VARIABLES
Set variable
Script
to
Text
SCRIPTING
End If

If Result
SCRIPTING
Run script over SSH
Options Under Construction

Shell Script Result
SCRIPTING
Show
Shell Script Result
Showcuts