diff options
author | Adam Jahn <ajjahn@gmail.com> | 2016-01-22 12:03:55 -0500 |
---|---|---|
committer | Adam Jahn <ajjahn@gmail.com> | 2016-01-22 12:03:55 -0500 |
commit | 6b84cf51c863034c2dbba12f380bf8e82a529abb (patch) | |
tree | 17641909f729f4980bc5ff10f241f032f98dfa4f /templates | |
parent | 6d835c44da343f84472f1da2627b350da173050e (diff) | |
parent | 9d63c7be3fa57e4af93c787f8b740658ec14f1f6 (diff) | |
download | puppet-samba-6b84cf51c863034c2dbba12f380bf8e82a529abb.tar.gz puppet-samba-6b84cf51c863034c2dbba12f380bf8e82a529abb.tar.bz2 |
Merge pull request #49 from alexjfisher/remove_add_check_user_scripts
Remove add/check user scripts
Diffstat (limited to 'templates')
-rw-r--r-- | templates/add_samba_user | 16 | ||||
-rw-r--r-- | templates/check_samba_user | 16 |
2 files changed, 0 insertions, 32 deletions
diff --git a/templates/add_samba_user b/templates/add_samba_user deleted file mode 100644 index cc1d56b..0000000 --- a/templates/add_samba_user +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -# This script adds a samba account for a given user and password -# call as: -# > add_samba_user "USERNAME" "PASSWORD" - -/bin/echo -e "$2\n$2\n" | sudo /usr/bin/pdbedit -a "$1" -t 1>/dev/null -results=$? - -if [ $results = 0 ]; then - echo "added samba account for '$1'" -else - echo "could not add samba account for '$1'" -fi - -exit $results diff --git a/templates/check_samba_user b/templates/check_samba_user deleted file mode 100644 index 431c3c4..0000000 --- a/templates/check_samba_user +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -# This script checks to see if a given user account exists on samba -# if so, it returns 0 -# otherwise it returns 1 - -sudo /usr/bin/pdbedit -L | egrep -q "^$1:" -exists=$? - -if [ $exists = 0 ]; then - echo "'$1' is a samba user" -else - echo "no samba account matching '$1'" -fi - -exit $exists |