smb.conf para um servidor de dominio primário em Linux

Isto é global do ficheiro /etc/smb.confÂ

 log file = /var/log/samba/log.%I
 load printers = yes
 socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
 domain master = yes
 encrypt passwords = yes
 hosts allow = 192.168.1. 127.
 passdb backend = tdbsam
 wins proxy = yes
 wins support = true
 dns proxy = yes
 netbios name = server
 server string = Dominio_PDC
 printing = cups
 logon script = logon.bat
 smb passwd file = /etc/smbpasswdÂ
 passwd program = /etc/passwd %u
 unix password sync = yes
 local master = yes
#As linhas abaixo servem para usar os perfis armazenados no servidor quando uma maquina em windows se autentica no dominio(o que vai ficar nesta pasta é o conteudo da pasta documents and settings para cada utilizador) , para que funcione implica que haja uma partilha chamada profiles e que todos possam ler e escrever, talvez aqui seja lugar para um chmod 777

logon home = file://%L/%U/.profiles
 logon path = file://%L/profiles/%U
 workgroup = nortrest
 os level = 32
 security = user
 max log size = 50
 domain logons = yes


Para adicionar utilizadores ao dominio samba é necessário que esses utilizadores existam no sistema, por exemplo para adicionar o utilizador exemplo ao dominio (pressumindo que já existe no linux) é só escrever smbpasswd -a exemplo. É necessário adicionar as nossas máquinas de confiança, ou seja as máquinas que se podem juntar ao dominio para isso eu costumo fazer assim

useradd -s /bin/false -d /dev/null NomeComputador\$Â Â Â

smbpasswd -a -m NomeComputador

o \$ tem mesmo que estar lá

Se existir algum erro neste pseudo manual, enviem-me a correção ou sugestão…


Recuperar sistema após ataques de virus\ou trojans

Depois de limpar alguns virus e trojans no windows, por vezes ficam os ficheiros do windows danificados ou não existem e podem provocar erros, para verificar e repôr os ficheiros originais do windows basta executar o comando

scf /scannow

Nota: Tem que ter o cd do windows na drive, ou a pasta i386 no disco e quando for questionado por algum ficheiro em falta apontar para esse directorio. 😉

Problemas com o tcp-ip e netbios em ambiente windows

Estes comandos já corrigiram vários problemas de rede no windows Xp Home\Pro…

Primeiro Reset ao winsock:

netsh winsock reset

Segundo reset ao própio Tcp/ip

netsh int ip reset c:\log.txt

os problemas que corrigi com estes comandos vão desde dificuldade\problemas em obter ip a partir de um servidor de dhcp a problemas de resolução de nomes em redes.

Chamadas grátis pela internet… com o VOIPBUSTER

O voIpBuster permite fazer chamadas grátis para a rede fixa portuguesa a custo 0, a versão normal é limita as chamadas a 1 minuto, mas se fizer o carregamento minimo 5 euros + impostos ficamos sem tempo limite nas chamadas para numeros fixos em Portugal.

Este programa e as intruções podem ser encontradas em

Using your (stupid) neighbor wireless connection guide

Many people don’t know it, but they are open to getting free highspeed internet. This is simply due to the fact that they have a neighbor that is using wireless networking and has not properly secured there connection. With a few simple tools you can tap into your neighbor’s wireless connection and begin taking advantage of free high speed internet connection. Only one warning, it is not legal to hack into other people’s computers and steal stuff, does not condone the use of these tools for hacking. These tools are only here to better help secure your wireless network. Essential Items:
1. Get a good browser, I prefer Firefox. Firefox is not only a good browser for surfing the web, but it is more secure and allows you to tweak your internet to go faster.
2. You will need a wireless network card. Any card should do fine, most networks are G, so a 802.11g card would be the best route to go, also probably the cheapest.Thats all the items you need to get started. The rest of the items are found below and links to them are found right above the picture of them.
Finding Wireless Networks
Locating a wireless network is the first step in trying to exploit it. There are two tools that are commonly used in this regard:

Network Stumbler a.k.a NetStumbler ““ This Windows based tool easily finds wireless signals being broadcast within range ““ A must have. It also has ability to determine Signal/Noise info that can be used for site surveys. I actually know of one highly known public wireless hotspot provider that uses this utility for their site surveys.

Kismet ““ One of the key functional elements missing from NetStumbler is the ability to display Wireless Networks that are not broadcasting their SSID. As a potential wireless security expert, you should realize that Access Points are routinely broadcasting this info; it just isn”™t being read/deciphered. Kismet will detect and display SSIDs that are not being broadcast which is very critical in finding wireless networks.
Attaching to the Found Wireless NetworkOnce you”™ve found a wireless network, the next step is to try to connect to it. If the network isn”™t using any type of authentication or encryption security, you can simply connect to the SSID. If the SSID isn”™t being broadcast, you can create a profile with the name of the SSID that is not being broadcast. Of course you found the non-broadcast SSID with Kismet, right? If the wireless network is using authentication and/or encryption, you may need one of the following tools.

Airsnort ““ This is a very easy to use tool that can be used to sniff and crack WEP keys. While many people bash the use of WEP, it is certainly better than using nothing at all. Something you”™ll find in using this tool is that it takes a lot of sniffed packets to crack the WEP key. There are additional tools and strategies that can be used to force the generation of traffic on the wireless network to shorten the amount of time needed to crack the key, but this feature is not included in Airsnort.

CowPatty ““ This tool is used as a brute force tool for cracking WPA-PSK, considered the “New WEP” for home Wireless Security. This program simply tries a bunch of different options from a dictionary file to see if one ends up matching what is defined as the Pre-Shared Key.Â

Source:Â Â