Skip to content

Commit

Permalink
WIP.
Browse files Browse the repository at this point in the history
  • Loading branch information
jonhadfield committed Aug 20, 2016
1 parent 50ea59a commit 8e8aa86
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion lib/creds/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
LINUX_CMD_USERDEL = spawn.find_executable("userdel")
LINUX_CMD_GROUP_ADD = spawn.find_executable("groupadd")
LINUX_CMD_GROUP_DEL = spawn.find_executable("groupdel")
# BSD COMMANDS
BSD_CMD_PW = spawn.find_executable("pw")


Expand Down
4 changes: 2 additions & 2 deletions lib/creds/users.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def generate_add_user_command(proposed_user=None):
command = '{0} -s {1}'.format(command, proposed_user.shell)
command = '{0} {1}'.format(command, proposed_user.name)
elif PLATFORM == 'FreeBSD':
command = '{0} {1}'.format(sudo_check(), BSD_CMD_ADDUSER)
command = '{0} {1} useradd'.format(sudo_check(), BSD_CMD_PW)
if proposed_user.uid:
command = '{0} -u {1}'.format(command, proposed_user.uid)
if proposed_user.gid:
Expand Down Expand Up @@ -290,7 +290,7 @@ def generate_delete_user_command(username=None):
if PLATFORM == 'Linux':
command = '{0} {1} -r {2}'.format(sudo_check(), LINUX_CMD_USERDEL, username)
elif PLATFORM == 'FreeBSD':
command = '{0} {1} -y {2}'.format(sudo_check(), BSD_CMD_RMUSER, username)
command = '{0} {1} userdel -r {2}'.format(sudo_check(), BSD_CMD_PW, username)
return shlex.split(str(command))


Expand Down

0 comments on commit 8e8aa86

Please sign in to comment.