#!/usr/bin/python
import os
readLine = open('desktops.txt','r')
for line in readLine:
machineName = line
query = os.system('wmic -U corp.fakedomain.com/domainusername%password //192.168.1.100 "Select * from Win32_UserAccount Where LocalAccount = True"|grep "500|"|cut -d "\\" -f 2|cut -d "|" -f1')
我收到以下错误...
myhostname:~# ./getLocalAdminNames.py sh:语法错误:未终止的带引号的字符串 sh:语法错误:未终止的带引号的字符串 sh:语法错误:未终止的带引号的字符串 sh:语法错误:未终止的带引号的字符串 sh:语法错误:未终止的带引号的字符串
然后在我解决错误后,我想用 machineName 变量替换 IP。
任何帮助将不胜感激。