2011/10/21

Cannot open default admin shares on Windows 2008R2

CURRENT CONFIGURATION: Windows 2008 R2 SP1 (In workgroup), Windows 7

ISSUE: Cannot open default admin shares on Windows 2008R2 (C$, etc.) with account credentials in local Administrators group but the account is not Administrator. I could connect to non standard shares with the same credentials

C:\>net use \\MyServerName\c$ /user:MyServerName\MyAdminUser MyPassword

System error 5 has occurred.

Access is denied.

SOLUTION:

Please open regedit, navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System

Create new DWORD (32-bit) Value "LocalAccountTokenFilterPolicy"

Change in data 0 to 1

Please open Start –> Administrative Tools –> Server Manager –> Roles –> File Services –> Share and Storage Management

Right click on C$ –> Stop sharing

Open Command Promt as administrator

C:\>sc stop LanmanServer

C:\>sc start LanmanServer

DOWNLOAD: Download md5: 8062a4edaf664c0f742500c61293153c HKLM_W2008R2_Access_to_admin_shares_fix.zip

LINKS: kb947232

 

2011/05/24

WSUS issue: directory permissions and shares disappeared

CURRENT CONFIGURATION: Windows 2003 R2 x64 SP2, WSUS 3.0 SP1 and remote MS SQL 2005 server
OBJECTIVE: Fix issue with WSUS directory permissions and shares.
ISSUE: WSUS folder content was restored to the same location D:\WSUS but with folder and share permissions issue. WSUS shares were disappeared after server restart. 
Server Event ID: 10012 The permissions on directory D:\ are incorrect. 
Clients logs:
80070005    AutomaticUpdates    Failure    Content Download    Error: Download failed.
SOLUTION: 
Use \Program Files\Update Services\Tools\wsusutil.exe
Create new empty folder WSUS2
Run next commands.
"C:\Program Files\Update Services\Tools\wsusutil.exe" movecontent D:\WSUS2 d:\move.log -skipcopy
"C:\Program Files\Update Services\Tools\wsusutil.exe" movecontent D:\WSUS d:\move2.log -skipcopy
It would takes a while.
move2.log:
Successfully stopped WsusService.
Beginning content file location change to D:\WSUS
Did not copy files due to -skipcopy flag.
Successfully changed WUS configuration.
Successfully changed IIS virtual directory path.
Successfully removed existing local content network shares.
Successfully created local content network shares.
Successfully changed registry value for content store directory.
Successfully changed content file location.
Successfully started WsusService.
Content integrity check and repair...
Initiated content integrity check and repair.
Check WSUS status
"C:\Program Files\Update Services\Tools\wsusutil.exe" checkhealth
Done. Please check event log for events with source "Windows Server Update Services".

2011/04/04

Shutdown all guests on Vmware virtual host

CURRENT CONFIGURATION: VMware 4.1.0 Build 260247
OBJECTIVE: Shutdown all guests on Vmware virtual host from APC Power Shute client.
SOLUTION: 
Please enable SSH on VMware host. vSphere Client -> Configuration -> Security Profile -> Properties -> SSH -> Start automatically.
Please download putty and run next command on Windows workstation or server.
@START c:\MyFolder\putty\plink.exe -ssh -pw MyPassword root@10.1.1.1 "/sbin/shutdown.sh -r now; /sbin/poweroff"

2011/01/10

Copy virtual machine on VmWare - network card issue

CURRENT CONFIGURATION: VMware ESXi 4, Ubuntu server 10.04
OBJECTIVE: Copy virtual machine on VMware
ISSUE: Network Card does not work after Linux virtual machine copy on VMware ESXi
 # /etc/init.d/networking restart
 * Reconfiguring network interfaces...
SIOCSIFADDR: No such device
eth0: ERROR while getting interface flags: No such device
SIOCSIFNETMASK: No such device
eth0: ERROR while getting interface flags: No such device
Failed to bring up eth0.
stop: Unknown instance:
# ifconfig -a
eth0_rename Link encap:Ethernet  HWaddr 00:00:xx:00:xx:00
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
All NIC are installed. Check command is
# lshw -C network
SOLUTION: 
to comment all lines in /etc/udev/rules.d/70-persistent-net.rules
# vi /etc/udev/rules.d/70-persistent-net.rules
Example:
# PCI device 0x8086:0x100f (e1000)
# SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:00:00:00:xx:01", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
# PCI device 0x8086:0x100f (e1000)
# SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:00:xx:00:00:02", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
Please reboot the Ubuntu server on VMware ESXi.

For Ubuntu server clone (image) creation (moving preparation) use next command on master clone (Source server) before final poweroff (shutdown).
sed -i 's/SUBSYSTEM/#SUBSYSTEM/g' /etc/udev/rules.d/70-persistent-net.rules

upgrade to VMvare ESXi 4.1 Perl VIRuntime.pm issue

CURRENT CONFIGURATION: VMware ESXi 4.0
OBJECTIVE: upgrade to VMvare ESXi 4.1
ISSUE:
1. VMware vSphere Host Update Utility 4.0 can not update ESXi 4.0 to 4.1
2. Command(1) C:\Program Files\VMware\VMware vSphere CLI> vihostupdate.pl --server myESXserver_name_orIP -i -b k:\Downloads\VMWare\VMWare_ESXi\ESXi4.1\upgrade-from-ESXi4.0-to-4.1.0-0.0.260247-release.zip -B ESXi410-GA
returns next error message
Can't locate VMware/VIRuntime.pm in @INC (@INC contains: C:/My_different_perl_version_installation/Perl/site/lib C
:My_different_perl_version_installation/Perl/lib .) at C:\Program Files\VMware\VMware vSphere CLI\bin\vihostupdat
e.pl line 13.
BEGIN failed--compilation aborted at C:\Program Files\VMware\VMware vSphere CLI\
bin\vihostupdate.pl line 13.
 3. When you had renamed previously installed Perl Folder command(1) would return next window
4. When you added Perl with full patch to command(1) command(2) would return next error message:
Can't open perl script "vihostupdate.pl": No such file or directory
SOLUTION:
1. Download  and install VMware vSphere
2. If you have previously installed Perl please rename Perl installation directory temporary. Example: From  C:/My_different_perl_version_installation/ to C:/__My_different_perl_version_installation/
3. Add Perl with full patch to command(1). Would be command(2)  
C:\Program Files\VMware\VMware vSphere CLI> "c:\Program Files\VMware\VMware vSphere CLI\Perl\bin\perl.exe" vihostupdate.pl --server myESXserver_name_orIP -i -b k:\Downloads\VMWare\VMWare_ESXi\ESXi4.1\upgrade-from-ESXi4.0-to-4.1.0-0.0.260247-release.zip -B ESXi410-GA
4. Use full path for Perl and vihostupdate.pl. Would be command(3)
C:\Program Files\VMware\VMware vSphere CLI> "c:\Program Files\VMware\VMware vSphere CLI\Perl\bin\perl.exe" "c:\Program Files\VMware\VMware vSphere CLI\bin\vihostupdate.pl" --server myESXserver_name_orIP -i -b k:\Downloads\VMWare\VMWare_ESXi\ESXi4.1\upgrade-from-ESXi4.0-to-4.1.0-0.0.260247-release.zip -B ESXi410-GA
SOLUTION BOTTOM LINE:
If you have previously installed Perl please rename Perl installation directory temporary.
Use full path for Perl and vihostupdate.pl. Would be command
C:\Program Files\VMware\VMware vSphere CLI> "c:\Program Files\VMware\VMware vSphere CLI\Perl\bin\perl.exe" "c:\Program Files\VMware\VMware vSphere CLI\bin\vihostupdate.pl" --server myESXserver_name_orIP -i -b k:\Downloads\VMWare\VMWare_ESXi\ESXi4.1\upgrade-from-ESXi4.0-to-4.1.0-0.0.260247-release.zip -B ESXi410-GA

To VMware: Thanks for nice exercise.