Skip to content

Commit

Permalink
pass the username during realm join. rockstor#1024
Browse files Browse the repository at this point in the history
  • Loading branch information
schakrava committed Feb 4, 2016
1 parent b754fc3 commit c0884a9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/rockstor/smart_manager/views/active_directory.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"""

import socket
import subprocess
from rest_framework.response import Response
from storageadmin.util import handle_exception
from system.services import (toggle_auth_service, systemctl)
Expand Down Expand Up @@ -65,9 +66,9 @@ def _validate_config(config, request):

@staticmethod
def _join_domain(config):
import subprocess
domain = config.get('domain')
cmd = ['realm', 'join', domain]
admin = config.get('username')
cmd = ['realm', 'join', '-U', admin, domain]
p = subprocess.Popen(cmd, shell=False,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
Expand Down

0 comments on commit c0884a9

Please sign in to comment.