This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import subprocess | |
| import os | |
| outputFilename = "netsh_wlan.txt" | |
| outputFilenameProfiles = "netsh_wlan_profiles.txt" | |
| netshcmd = subprocess.Popen("netsh wlan show networks mode=bssid",shell=True, stderr=subprocess.PIPE, stdout=subprocess.PIPE) | |
| output, errors = netshcmd.communicate() | |
| result = subprocess.run([r'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe', r'.\wlanprofiles.ps1'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #### User #### | |
| # Add user. | |
| useradd -m username | |
| # -m creates a home directory for the user. | |
| # Set Password. | |
| passwd username | |
| # Set user group to sudo. | |
| usermod -a -G sudo username |