Ejemplo n.º 1
0
        public bool IsUnjoinDomainSuccess()
        {
            TelnetClient  telnetClient = new TelnetClient(config.ClientIP, config.TelnetPort, config.ClientAdminUsername, config.ClientAdminPwd);
            string        response     = string.Empty;
            StringBuilder command      = new StringBuilder();

            command.Append(config.ClientScriptPath + config.IsUnjoinDomainSuccessScript + " ");
            telnetClient.WriteCommand(command.ToString());
            response = telnetClient.ReadResponse();
            return(telnetClient.CheckResponse(response));
        }
Ejemplo n.º 2
0
        public bool UnjoinDomain()
        {
            //Samba does not support unjoin domain
            //or refer to nick's suggestion by deleting some ldb file on samba client
            TelnetClient  telnetClient = new TelnetClient(config.ClientIP, config.TelnetPort, config.ClientAdminUsername, config.ClientAdminPwd);
            string        response     = string.Empty;
            StringBuilder command      = new StringBuilder();

            command.Append(config.ClientScriptPath + config.UnjoinDomainScript);
            telnetClient.WriteCommand(command.ToString());
            response = telnetClient.ReadResponse();
            return(telnetClient.CheckResponse(response));
        }
Ejemplo n.º 3
0
        public bool JoinDomainCreateAcctSAMR()
        {
            TelnetClient  telnetClient = new TelnetClient(config.ClientIP, config.TelnetPort, config.ClientAdminUsername, config.ClientAdminPwd);
            string        response     = string.Empty;
            StringBuilder command      = new StringBuilder();

            command.Append(config.ClientScriptPath + config.JoinDomainCreateAcctSAMRScript + " ");
            command.Append(config.FullDomainName + " ");
            command.Append(config.DomainAdminUsername + " ");
            command.Append(config.DomainAdminPwd);
            telnetClient.WriteCommand(command.ToString());
            response = telnetClient.ReadResponse();
            return(telnetClient.CheckResponse(response));
        }