Sequencia de comandos, executado em uma distro Fedora
#listar as interfaces
ifconfig
#down na interface wireless
ifconfig wlp3s2 down
#alterar a interface para type monitor
iw dev wlp3s2 set type monitor
#up na interface
ip link set wlp3s2 up
#ajustar o canal a ser monitorado
iw dev wlp3s2 set channel 6
#carregar o wireshark selecionar o interface a ser monitorada
wireshark
segunda-feira, 1 de junho de 2015
quarta-feira, 29 de abril de 2015
Configurar / Fortigate / USB Modem 3G
Fortigate / USB Modem 3G
#config system modem
#set status enable
This should get the modem showing up in the GUI
#set phone1 *99#
#set extra-init1 "at+cgdcont=1,\"IP\",\"broadband.windmobile.ca\""
If modem id needs to be added:
First get the USB device ID:
#fnsysctl cat /proc/bus/usb/devices
#config system 3g-modem custom
#edit 1
#set vendor "My Phone Company"
#set model "my phone model"
#set vendor-id "ff55"
#set product-is "88aa"
#end
Enable 4G/LTE:
#config system global
-----#set usb-lte enable
#set wimax-4g-usb enable
#end
Troubleshooting:
#diagnose sys modem detect wireless
#diagnose sys modem external-modem
Outros comandos
#config system modem
#set wireless-port {ttyusb0 | ttyusb1 | ttyusb2}
#end
#config system modem
#set mode standalone
#set auto-dial enable
#set idle-timer 2
#set redial 5
#end
#diagnose sys modem query
---------------------------------
Outra forma
Firstly, ensure that your modem is firmly plugged into a USB Port on the back of the Fortigate, and that you've power-cycled the unit to detect the modem. You'll need to enable the modem with the following command:
config system modem
set status enable
end
Next, try and detect the custom vendor and product IDs with the following command. Be sure to note it down, as you'll need it later!
FortiGate # diagnose sys modem wireless-id
vendor: 0x12d1, product: 0x1003, registered: yes
Next, we'll configure the modem settings in our FortiGate to activate the modem connection:
config system modem
set status enable
set status enable
set dial-on-demand enable
set connect-timeout 30
set wireless-custom-vendor-id 0x12d1
set wireless-custom-product-id 0x1003
set modem-dev1 pcmcia-wireless
set phone1 "*99#"
set username1 "3services" # Set this to your provider's APN
set altmode disable
end
We're almost there! The last thing to do is to turn on debugging (to watch the progress of the dial), and to actually execute the dial:
diagnose debug enable
diagnose debug application ppp 255
diagnose debug app modemd 255
execute modem dial
Once you're done, don't forget to turn off your logging:
diagnose debug application modemd 0
diagnose debug application ppp 0
diagnose debug disable
#config system modem
#set status enable
This should get the modem showing up in the GUI
#set phone1 *99#
#set extra-init1 "at+cgdcont=1,\"IP\",\"broadband.windmobile.ca\""
If modem id needs to be added:
First get the USB device ID:
#fnsysctl cat /proc/bus/usb/devices
#config system 3g-modem custom
#edit 1
#set vendor "My Phone Company"
#set model "my phone model"
#set vendor-id "ff55"
#set product-is "88aa"
#end
Enable 4G/LTE:
#config system global
-----#set usb-lte enable
#set wimax-4g-usb enable
#end
Troubleshooting:
#diagnose sys modem detect wireless
#diagnose sys modem external-modem
Outros comandos
#config system modem
#set wireless-port {ttyusb0 | ttyusb1 | ttyusb2}
#end
#config system modem
#set mode standalone
#set auto-dial enable
#set idle-timer 2
#set redial 5
#end
#diagnose sys modem query
---------------------------------
Outra forma
Firstly, ensure that your modem is firmly plugged into a USB Port on the back of the Fortigate, and that you've power-cycled the unit to detect the modem. You'll need to enable the modem with the following command:
config system modem
set status enable
end
Next, try and detect the custom vendor and product IDs with the following command. Be sure to note it down, as you'll need it later!
FortiGate # diagnose sys modem wireless-id
vendor: 0x12d1, product: 0x1003, registered: yes
Next, we'll configure the modem settings in our FortiGate to activate the modem connection:
config system modem
set status enable
set status enable
set dial-on-demand enable
set connect-timeout 30
set wireless-custom-vendor-id 0x12d1
set wireless-custom-product-id 0x1003
set modem-dev1 pcmcia-wireless
set phone1 "*99#"
set username1 "3services" # Set this to your provider's APN
set altmode disable
end
We're almost there! The last thing to do is to turn on debugging (to watch the progress of the dial), and to actually execute the dial:
diagnose debug enable
diagnose debug application ppp 255
diagnose debug app modemd 255
execute modem dial
Once you're done, don't forget to turn off your logging:
diagnose debug application modemd 0
diagnose debug application ppp 0
diagnose debug disable
quinta-feira, 4 de dezembro de 2014
Alterar a senha do Administrador da Farm SharePoint
No servidor de aplicação:
On the computer running the Central Administration Web site, open the command line and navigate to the
Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN folder.
At a command prompt, type the following command, and then press ENTER:
stsadm -o updatefarmcredentials -userlogin <domain\username> -password <newpassword>
NoteNote:
userlogin is the server farm account.
You must restart the Web application pool for the changes to be saved.
At a command prompt, type the following command, and then press ENTER:
iisreset /noforce
Alterar a senha dos serviços do Windows
On the computer running the Central Administration Web site, open the command line and navigate to the
Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN folder.
At a command prompt, type the following command, and then press ENTER:
stsadm -o updatefarmcredentials -userlogin <domain\username> -password <newpassword>
NoteNote:
userlogin is the server farm account.
You must restart the Web application pool for the changes to be saved.
At a command prompt, type the following command, and then press ENTER:
iisreset /noforce
Alterar a senha dos serviços do Windows
segunda-feira, 3 de novembro de 2014
WMI reset failed
WMI reset failed
Resolução de vários problemas, tais como não instalar o cliente SCCM e desaparecendo namespaces cluster. Geralmente redefinir o WMI é um último recurso e só deve ser utilizado quando você já tentou todas as outras opções. por exemplo reiniciar o serviço WMI, reiniciar servidor.
O comando para redefinir o repositório WMI deve ser executado em um prompt de comando elevado:
winmgmt / resetrepository
No entanto, por vezes, esta falha com este erro:
C: \ Users \ adminuser> Winmgmt / resetrepository
C:\Users\adminuser>Winmgmt /resetrepository
WMI repository reset failed
Error code: 0x8007041B
Facility: Win32
Description: A stop control has been sent to a service that other running services are dependent on.
Embora seja possível contornar parando os serviços dependentes manualmente ou até mesmo editar o registro para que nada seja dependente deste, existe uma solução muito mais fácil.
1. Inicie um (admin) janela do PowerShell elevado.
2. Digite o comando a seguir.
Stop-Service winmgmt -Force; winmgmt / resetrepository
3. Reinicie o computador.
Resolução de vários problemas, tais como não instalar o cliente SCCM e desaparecendo namespaces cluster. Geralmente redefinir o WMI é um último recurso e só deve ser utilizado quando você já tentou todas as outras opções. por exemplo reiniciar o serviço WMI, reiniciar servidor.
O comando para redefinir o repositório WMI deve ser executado em um prompt de comando elevado:
winmgmt / resetrepository
No entanto, por vezes, esta falha com este erro:
C: \ Users \ adminuser> Winmgmt / resetrepository
C:\Users\adminuser>Winmgmt /resetrepository
WMI repository reset failed
Error code: 0x8007041B
Facility: Win32
Description: A stop control has been sent to a service that other running services are dependent on.
Embora seja possível contornar parando os serviços dependentes manualmente ou até mesmo editar o registro para que nada seja dependente deste, existe uma solução muito mais fácil.
1. Inicie um (admin) janela do PowerShell elevado.
2. Digite o comando a seguir.
Stop-Service winmgmt -Force; winmgmt / resetrepository
3. Reinicie o computador.
terça-feira, 8 de julho de 2014
Liberar e bloquear tipos de extensões de anexo no OWA - Exchange 2013
Verificar o nome da politica do OWA padrão:
Acesse o Centro de Administração do Exchange > Permissões > Politicas do Outlook Web App
Através do powershell:
Para verificar as extensões já liberadas
Get-OwaMailboxPolicy Default | select -ExpandProperty allowedfiletypes
Para verificar as extensões bloqueadas
Get-OwaMailboxPolicy Default | select -ExpandProperty blockedfiletypes
Remover extensão da lista de bloqueados: Ex.: xml
Get-OwaMailboxPolicy Default | Set-OwaMailboxPolicy -BlockedFileTypes @{Remove = “.xml”}
Get-OwaMailboxPolicy Default | Set-OwaMailboxPolicy -BlockedMimeTypes @{Remove = “text/xml”, “application/xml”}
Adicionar na lista de extensões permitidas
Get-OwaMailboxPolicy Default | Set-OwaMailboxPolicy –AllowedFileTypes @{Add = “.xml”}
Get-OwaMailboxPolicy Default | Set-OwaMailboxPolicy -AllowedMimeTypes @{Add = “text/xml”, “application/xml”}
Referencia: http://technet.microsoft.com/en-us/library/dd297989(v=exchg.150).aspx
terça-feira, 8 de abril de 2014
Comandos Exchange
Desabilitar IMAP do mailbox do usuário:
Set-CASMailbox -Identity "usuario" -IMAPEnabled $false
Listar todos os usuários:
Get-Mailbox | Sort database, name | Format-Table name, database
MessageTracking:
Search-MessageTrackingReport -Identity ad\usuario.mailbox -sender "usuario.externo@contoso.com.br" -BypassDelegateChecking -DoNotResolve
Search-MessageTrackingReport -Identity "ad\usuario.mailbox" -Sender "usuario.externo@contoso.com.br" -ByPassDelegateChecking -DoNotResolve | ForEach-Object { Get-MessageTrackingReport -Identity $_.MessageTrackingReportID -DetailLevel Verbose -BypassDelegateChecking -DoNotResolve -RecipientPathFilter "usuario.mailbox@minhaempresa.com.br" -ReportTemplate RecipientPath }
Set-CASMailbox -Identity "usuario" -IMAPEnabled $false
Listar todos os usuários:
Get-Mailbox | Sort database, name | Format-Table name, database
MessageTracking:
Search-MessageTrackingReport -Identity ad\usuario.mailbox -sender "usuario.externo@contoso.com.br" -BypassDelegateChecking -DoNotResolve
Search-MessageTrackingReport -Identity "ad\usuario.mailbox" -Sender "usuario.externo@contoso.com.br" -ByPassDelegateChecking -DoNotResolve | ForEach-Object { Get-MessageTrackingReport -Identity $_.MessageTrackingReportID -DetailLevel Verbose -BypassDelegateChecking -DoNotResolve -RecipientPathFilter "usuario.mailbox@minhaempresa.com.br" -ReportTemplate RecipientPath }
Implantar atualizações do System Center 2012 Endpoint Protection via Share UNC
Segue link referencia:
http://www.niallbrady.com/2013/02/22/how-can-i-deploy-system-center-2012-endpoint-protection-definition-updates-from-a-unc-file-shares/
http://www.niallbrady.com/2013/02/22/how-can-i-deploy-system-center-2012-endpoint-protection-definition-updates-from-a-unc-file-shares/
sexta-feira, 21 de março de 2014
YUM - Install epel and remi repositories
1. Install epel and remi repositories:
# wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
# wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
# sudo rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm
2. Enable remi repository:
# sudo vi /etc/yum.repos.d/remi.repo
In the [remi] section of the file, set the "enabled" option to 1.
# wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
# wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
# sudo rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm
2. Enable remi repository:
# sudo vi /etc/yum.repos.d/remi.repo
In the [remi] section of the file, set the "enabled" option to 1.
terça-feira, 16 de julho de 2013
Desativar Prompt's de segurança SAP GUI 7.30
32bits OS
HKEY_LOCAL_MACHINE\Software\SAP\SAPGUI Front\SAP Frontend Server\Security,
Add 2 registry entries at the end of the install.
DWORD key SecurityLevel with a value of 0 to deactivate
DWORD key DefaultAction with a value of 0 to allow
64bits OS
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\SAP\SAPGUI Front\SAP Frontend Server\Security
quarta-feira, 10 de abril de 2013
WINDOWS 7 NÃO INICIALIZA APÓS INSTALAÇÃO DE ATUALIZAÇÃO KB2823324 - 09/04/2013
Para a regularização parcial do problema, após entrar no prompt de comando do modo de reparação do windows, executem o comando.
- Na reinicialização pressione F8
- Utilizar o opção "Reparar seu computador"
- Selecione o Lay-out do teclado -> Avançar
- Informe a senha do administrador
- Escolha a opção "Prompt de comando"
Digitar o comando a seguir:
dism.exe /image:C:\ /cleanup-image /revertpendingactions
Lembrando que o C:\ pode ter outra letra dependendo de como sua instalação foi realizada, para isso acessa a unidade e confirme se o diretório do Windows se encontra na partição. ( Ex: C:\, D:\, E:\ ...)
Após a conclusão do procedimento, reinicie o computador.
Feito isso, execute novamente o update do windows mas desabilite e oculte a tualização para o seguinte update:
KB2823324 - Este é o update que esta causando todo esse problema:
Descrição do Update: http://support.micro....com/kb/2823324
Origem: http://www.babooforum.com.br/forum/index.php?/topic/766585-windows-7-não-inicia-depois-de-atualização/#ixzz2Q5CFEo7p
---------------------------
2º Opção
1 - Bootar a máquina com a mídia de instalação do windows;
2 - Entrar no console de recuperação;
3 - Abrir o notepad;
4 - Navegar até a pasta %windir%\system32\drivers e verificar se a versão do arquivo ntfs.sys que está instalada é a mesma do KB http://support.microsoft.com/kb/2823324;
5 - Se for o caso, renomear o arquivo ntfs.sys para ntfs.sys_old;
6 - Navegar até a pasta %windir%\winsxs e localizar um arquivo Ntfs.sys em uma vesão mais antiga. No meu caso era: 6.1.7601.17945;
7 - Copie o arquivo mais antigo para a pasta %windir%\system32\drivers.
8 - Reboote o sistema.
- Na reinicialização pressione F8
- Utilizar o opção "Reparar seu computador"
- Selecione o Lay-out do teclado -> Avançar
- Informe a senha do administrador
- Escolha a opção "Prompt de comando"
Digitar o comando a seguir:
dism.exe /image:C:\ /cleanup-image /revertpendingactions
Lembrando que o C:\ pode ter outra letra dependendo de como sua instalação foi realizada, para isso acessa a unidade e confirme se o diretório do Windows se encontra na partição. ( Ex: C:\, D:\, E:\ ...)
Após a conclusão do procedimento, reinicie o computador.
Feito isso, execute novamente o update do windows mas desabilite e oculte a tualização para o seguinte update:
KB2823324 - Este é o update que esta causando todo esse problema:
Descrição do Update: http://support.micro....com/kb/2823324
Origem: http://www.babooforum.com.br/forum/index.php?/topic/766585-windows-7-não-inicia-depois-de-atualização/#ixzz2Q5CFEo7p
---------------------------
2º Opção
1 - Bootar a máquina com a mídia de instalação do windows;
2 - Entrar no console de recuperação;
3 - Abrir o notepad;
4 - Navegar até a pasta %windir%\system32\drivers e verificar se a versão do arquivo ntfs.sys que está instalada é a mesma do KB http://support.microsoft.com/kb/2823324;
5 - Se for o caso, renomear o arquivo ntfs.sys para ntfs.sys_old;
6 - Navegar até a pasta %windir%\winsxs e localizar um arquivo Ntfs.sys em uma vesão mais antiga. No meu caso era: 6.1.7601.17945;
7 - Copie o arquivo mais antigo para a pasta %windir%\system32\drivers.
8 - Reboote o sistema.
Assinar:
Postagens (Atom)