Ubuntu: Colocando o Ubuntu 12 no AD do Windows

[Fonte: http://jamesisin.com/a_high-tech_blech/index.php/2011/12/attach-ubuntu-to-windows-domain-via-active-directory-sudo/]


There may not be too many advantages to adding your Ubuntu machines to your Windows domain, but if you think of them this will allow you to work toward them.  It’s actually pretty easy to add a Linux box to Active Directory.  This is true because AD started out life as an LDAP server and it still retains its LDAP genes somewhere deep inside its withered exterior.

First thing you will want to do is add this utility to your Ubuntu machine:

sudo apt-get install likewise-open

It will allow you to authenticate against AD using Kerberos.  If you don’t know what that means it’s not important at this stage; it’s enough to understand that it’s a secure method for assuring identity between your client machine and your AD server.

I then added the machine to the domain.  Again this is a simple operation.  Before you do anything on the Ubuntu machine, hop into Active Directory and create a machine account in the name of the Ubuntu machine.  Then back on the Ubuntu machine it’s one line of code:

sudo domainjoin-cli join [domain.name] [username]

Easy enough.

Further I added a domain group to the local sudo group by adding these lines to the /etc/sudoers file:

# Active Directory group [groupname] given sudo privs
%[domain.name]\\[groupname] ALL=(ALL) ALL

OBS: Entrada testada: %ICA\\Domain^Admins ALL=(ALL) ALL

If you don’t know how to edit a protected file like /etc/sudoers I recommend using Gedit:

gksudo gedit /etc/sudoers

Just add those two lines to the end of the file.  The first line is just a comment line and could say something different.  Replace those items in the square brackets with the appropriate information to your network.

For the group I created in Active Directory to grant these sudo privileges I included Domain Administrators and a couple of individuals who would likely be using the Ubuntu box and need sudo rights.  If you’d rather you could substitute a username for the groupname in the edit above, but I think it’s better to use a security group in AD since you’re now attached to it.

Anyway, that’s about it.  Not too exciting but sure it’s useful for something.  Have fun with it.

(The same can be done with Macs or probably any Unix-like system as long as it can authenticate against an LDAP.  Of course for other systems the details will be, you know, different.)

Como executar um programa como outro usuário no Windows 8

Por padrão, o recurso de “Run as different user” vem desabilitado no Windows 8. Para habilitá-lo siga os passos abaixo.

  1. Execute o comando gpedit.msc (pode ser utilizando o Run, apertando tecla Windows + r.) para abrir o Local Group Policy Editor.
  2. No menu em árvore da janela que se abriu, caminhe até User Configuration\Administrative Templates\Start Menu and Taskbar.
  3. Na parte da direita, clique duas vezes sobre a opção Show “Run as different user” command on Start.
  4. Habilite o recurso na janela que se abriu e clique em ok para confirmar a mudança e feche a janela do Local Group Policy Editor.
  5. Para que a alteração entre em vigor, execute o comando gpupdate /force (como no passo 1).


  1. http://www.howtogeek.com/114708/how-to-run-windows-8-apps-as-a-different-user-from-the-start-screen/
  2. http://www.ghacks.net/2012/08/05/add-run-as-different-user-to-the-windows-8-startpage/

Como alterar a chave do Windows 8

  1. Execute o prompt como administrador (Na tela inicial, digite cmd. Clique com o botão direito do mouse em Command Promt e depois, no rodapé, em Run as administrator).
  2. No prompt, digite o comando slmgr.vbs -ipk CHAVE-DE-ATIVAÇÃO.
  3. Você vai receber um alerta confirmando a mudança.
  4. Depois, para fazer a ativação com a nova chave, digite o comando slmgr.vbs -ato.
  5. Por último, reinicie o computador.

Uma outra maneira, não testada ainda, é utilizar o comando slui 3.