Visualizzazione post con etichetta windows. Mostra tutti i post
Visualizzazione post con etichetta windows. Mostra tutti i post

2011/12/07

Mi è sparito il cestino!

Una soluzione per far riapparire il cestino

Creare una cartella sul desktop e rinominala in questo modo (caldamente consigliato il copia/incolla ):
Cestino.{645FF040-5081-101B-9F08-00AA002F954E}

E il cestino tornerà al suo posto!
Mitico!

Autenticazione in ASP su dominio windows

Ecco come son riuscito ad autenticare da una pagina asp sul dominio windows .
La funzione controlla USERNAME/PASSORD ma anche l'apaprtenenza o meno ad un gruppo.
Se il gruppo è passato come vuoto "" la procedura verifica solo USER/password

Ganzo!

<%@Language="VBScript"%>
<%
'USAGE
'response.write (validateUserAndGroup("domain", "username","password","thegroup"))
'return value: 0=SUCCESS 1=FAIL
function validateUserAndGroup(domainname,strUsername,strpassword,theTeamName)

'Avoid error messages
on error resume next

' VERIFICA USERNAME/PASSWORD
Set objDomain = GetObject ("LDAP://rootDSE")
objADsPath = objDomain.Get("defaultNamingContext")
Set objDomain = Nothing
Set objConnection = Server.CreateObject("ADODB.Connection")
objConnection.provider ="ADsDSOObject"
objConnection.Properties("User ID") =  domainname+"\" + strUsername
objConnection.Properties("Password") = strpassword
objConnection.open "Active Directory Provider"
Set objCommand = CreateObject("ADODB.Command")
Set objCommand.ActiveConnection = objConnection
objCommand.CommandText ="select cn FROM 'LDAP://"+objADsPath+"' where sAMAccountname='"+strUsername+"'"
Set objRS = objCommand.Execute

If Err.Number <> 0 Then
' USER NOT VALID : FAIL
'response.write ("USER NOT VALID: FAIL")
  validateUserAndGroup=1
Exit Function
Else
if theTeamName="" then
' GROUP NOT TO BE CHECKED
' USER VALID : SUCCESS
'response.write ("USER  VALID: Group Not Needed")
validateUserAndGroup=0
Exit Function
else
' GROUP MUST BE CHECKED 
  objCommand.CommandText ="select memberOf FROM 'LDAP://"+objADsPath+"' where sAMAccountname='"+strUsername+"'"
  'response.write objCommand.CommandText &"
"
  Set rs = objCommand.Execute
  membership=rs("memberof")
  rs.Close
  objConnection.Close

  Set rs = Nothing
  Set objConnection = Nothing
  For each group in membership
   newgroup=split(group,"=")
   tempgroup=left(newgroup(1), len(newgroup(1))-3)
   tempgroup=lcase(tempgroup) 
   If tempgroup=TheTeamName Then
    ' GROUP VALID : SUCCESS
    validateUserAndGroup=0
    Exit Function
   End If         
  Next
end if
End If
' GROUP NOT VALID : FAIL
'response.write ("GROUP NOT VALID: FAIL")
validateUserAndGroup=1
end function
%>

recuperare/cambiare password di amministratore di macchina WINDOWS da utente di DOMINIO

Occorre comunque avere una password di accesso di una utenza amministrativa...
in questo caso il ROOT di DOMAIN che è anche admin di ogni host.
Evitare di aprire loggare sulle macchine come ADMIN di rete a meno che non sia davvero indispensabile.
In questo caso viene svolto solo un runas per eseguire un comando .. alla stregua del sudo di linux.

Entrare come un qualsiasi utente della macchina

aprire una shell e eseguire

  • runas /user:\administrator "cmd"


si apre una shell a livello di "AMMINISTRATORE DI DOMINIO"
in cui eseguire quindi

  • net user Administrator *

che permette di reimpostare la password di amministatore di macchina

se l'account fosse disattivato basta attivarlo con
  • net user administrator /active:yes

Attivare il remote desktop da Registro

Mi è stato impedito di attivare il RemoteDesktop da interfaccia grafica...
ma esiste un modo di attivarlo entrando nel registro di configurazione della macchina.
La CHIAVE da modificare è questa
fDenyTSConnections 
che trovate dentro
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server
e basta resettarla.

Riporto il testo del Technet

If for any reason you neglected to perform this procedure prior to shipping the server, you can enable Remote Desktop remotely by using the registry.
Administrative credentials 
To complete this procedure, you must be a member of the local Administrators group.

To enable Remote Desktop remotely by using the registry

  1. On any computer that is running a version of Windows Server 2003 or Windows XP Professional, click Start, click Run, type regedit, and then click OK.
  2. On the File menu, click Connect Network Registry.
  3. In the Select Computer dialog box, type the computer name and then click Check Names.
  4. In the Enter Network Password dialog box, provide Domain Admins credentials for the domain of the server, and then click OK.
  5. After the computer name resolves, click OK.
  6. In the computer node that appears in the Registry Editor, navigate toHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server.
  7. In the console tree, click Terminal Server and then, in the details pane, double-click fDenyTSConnections.
  8. In the Edit DWORD Value box, in Value data, type 0, and then click OK.
  9. To implement the change, reboot the server remotely, as follows:
    Open a command prompt, type the following, and then press Enter:
    shutdown -m \\ DomainControllerName -r 

Pannelli di Controllo in un comando



Do you use the Run feature in Windows XP? 
For most, this feature remains unused (or rarely used). Why is that? Well, first off nearly all of the Run Commands Correspond to a particular Control Panel Item or a Utility, Tool or Task that can be accessed through Windows.
Here is the list of diffrent Run command. To access go to run (Win + R )
  • Accessibility Controls : access.cpl
  • Accessibility Wizard : accwiz
  • Add Hardware Wizard : hdwwiz.cpl
  • Add/Remove Programs : appwiz.cpl
  • Administrative Tools control : admintools
  • Adobe Acrobat (if installed) : acrobat
  • Adobe Designer (if installed) : acrodist
  • Adobe Distiller (if installed) : acrodist
  • Adobe ImageReady (if installed) : imageready
  • Adobe Photoshop (if installed) : photoshop
  • Automatic Updates : wuaucpl.cpl
  • Bluetooth Transfer Wizard : fsquirt
  • Calculator : calc
  • Certificate Manager : certmgr.msc
  • Character Map : charmap
  • Check Disk Utility : chkdsk
  • Clipboard Viewer : clipbrd
  • Command Prompt : cmd
  • Component Services : dcomcnfg
  • Computer Management : compmgmt.msc
  • Control Panel : control
  • Date and Time Properties : timedate.cpl
  • DDE Shares : ddeshare
  • Device Manager : devmgmt.msc
  • Direct X Control Panel (If Installed)* : directx.cpl
  • Direct X Troubleshooter : dxdiag
  • Disk Cleanup Utility : cleanmgr
For a list of some of the Control Panel applet filenames see this (incomplete) list:

Control Panel AppletFilename
Accessibilityaccess.cpl
Add New Hardwarehdwwiz.cpl
Add/Remove Programsappwiz.cpl
Date/Time Propertiestimedate.cpl
Display Propertiesdesk.cpl
FindFastfindfast.cpl
Internet Propertiesinetcpl.cpl
Joystick Propertiesjoy.cpl
Keyboard Propertiesmain.cpl
Local Users managementnusrmgr.cpl
Microsoft Exchangemlcfg32.cpl
Microsoft Mail Post Officewgpocpl.cpl
Modem Propertiesmodem.cpl
Note: In Windows NT 4.0, W2K, XP and Windows 2003 - Modem properties is telephon.cpl
Mouse Propertiesmain.cpl
Multimedia Propertiesmmsys.cpl
Network Propertiesnetcpl.cpl
Note: In Windows NT 4.0, W2K, XP and Windows 2003 - Network properties is Ncpa.cpl
Password Propertiespassword.cpl
Power Optionspowercfg.cpl
Regional Settingsintl.cpl
Sound Propertiesmmsys.cpl
System Propertiessysdm.cpl

2011/09/08

Nascondere le cartelle condivise in Windows

 Come nascondere le condivisioni in windows!?

Windows permette di nascondere le cartelle condivise sulla rete in modo che vi possa entrare solo chi ne conosce l'indirizzo.

Selezionare la cartella da condividere e cliccare sopra con il tasto destro del mouse, quindi selezionare la voce Condivisione. Nella casella "Nome condivisione" scrivere il nome da assegnare alla cartella seguito dal carattere $.

In questo modo, sfogliando la rete, la cartella non apparirà più come condivisa, ma sarà comunque raggiungibile indicandone il percorso completo. Yeppa!

2011/06/14

WINDOWS: Mi è sparito il cestino dal Desktop

Una soluzione per far riapparire il cestino (trovata sul web).

Creare una cartella sul desktop e rinominala in questo modo (caldamente consigliato il copia/incolla ):
Cestino.{645FF040-5081-101B-9F08-00AA002F954E}

E il cestino tornerà al suo posto
MITICO!

ASP: Autenticazione su dominio WINDOWS

Ecco come son riuscito a verificare una utenza su dominio.
La funzione controlla USERNAME/PASSORD ma anche l'appartenenza o meno ad un gruppo.
Se il gruppo è passato come vuoto "" la procedura verifica solo USER/PASSORD


Ganzo!




<%@Language="VBScript"%>
<%
'USAGE
'response.write (validateUserAndGroup("domain", "username","password","thegroup"))
'return value: 0=SUCCESS 1=FAIL
function validateUserAndGroup(domainname,strUsername,strpassword,theTeamName)

'Avoid error messages
on error resume next

' VERIFICA USERNAME/PASSWORD
Set objDomain = GetObject ("LDAP://rootDSE")
objADsPath = objDomain.Get("defaultNamingContext")
Set objDomain = Nothing
Set objConnection = Server.CreateObject("ADODB.Connection")
objConnection.provider ="ADsDSOObject"
objConnection.Properties("User ID") =  domainname+"\" + strUsername
objConnection.Properties("Password") = strpassword
objConnection.open "Active Directory Provider"
Set objCommand = CreateObject("ADODB.Command")
Set objCommand.ActiveConnection = objConnection
objCommand.CommandText ="select cn FROM 'LDAP://"+objADsPath+"' where sAMAccountname='"+strUsername+"'"
Set objRS = objCommand.Execute

If Err.Number <> 0 Then
' USER NOT VALID : FAIL
'response.write ("USER NOT VALID: FAIL")
  validateUserAndGroup=1
Exit Function
Else
if theTeamName="" then
' GROUP NOT TO BE CHECKED
' USER VALID : SUCCESS
'response.write ("USER  VALID: Group Not Needed")
validateUserAndGroup=0
Exit Function
else
' GROUP MUST BE CHECKED 
  objCommand.CommandText ="select memberOf FROM 'LDAP://"+objADsPath+"' where sAMAccountname='"+strUsername+"'"
  'response.write objCommand.CommandText &"
"
  Set rs = objCommand.Execute
  membership=rs("memberof")
  rs.Close
  objConnection.Close

  Set rs = Nothing
  Set objConnection = Nothing
  For each group in membership
   newgroup=split(group,"=")
   tempgroup=left(newgroup(1), len(newgroup(1))-3)
   tempgroup=lcase(tempgroup) 
   If tempgroup=TheTeamName Then
    ' GROUP VALID : SUCCESS
    validateUserAndGroup=0
    Exit Function
   End If         
  Next
end if
End If
' GROUP NOT VALID : FAIL
'response.write ("GROUP NOT VALID: FAIL")
validateUserAndGroup=1
end function
%>

Recuperare password di WINDOWS dell'amministratore di MACCHINA

Mi è capitato di avere macchine proiettate in un dominio delle quali però non era più disponibile l'accesso come amministratore locale (utenza amministrativa di macchina)

Inquesto caso è possibile recuperare/cambiare la pwd di un qualsiasi utente amministratore locale.

Indispensabile è avere la PWD di una utenza amministrativa di Dominio.
Infatti il ROOT di DOMAIN che è anche admin di ogni host.

N.B.
Evitare di aprire loggare sulle macchine come ADMIN di rete a meno che non sia davvero indispensabile.

Entrare come un qualsiasi utente della macchina
aprire una shell e eseguire
runas /user:\domain\administrator "cmd"
Alla richiesta di password digitare quella di admin di dominio
si apre una shell a livello di "AMMINISTRATORE DI DOMINIO"
in cui eseguire quindi
net user Administrator *
che permette di reimpostare la password di amministatore di macchina
se l'account fosse disattivato basta attivarlo con
net user administrator /active:yes