In Windows XP you could simply login as administrator and rename the profile folder. As soon as logged back in as this user everything was recreated. In Windows 7 and Vista it doesn’t work like this anymore. If you just delete or rename the profile folder and you try to log back in it is going to create you a temporary profile. To avoid that you need to open the registry.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList
Search there for the profile you renamed or deleted and delete the folder. Reboot the computer and it should work again.
admin on July 6th 2010 in IT, Windows, Windows Server
It is actually very easy to get Windows 7 GPO Settings on a Windows 2008 Server. You just need to copy the %systemroot%\PolicyDefinitions from your Windows 7 machine into \\YOURSERVER\C$\Windows\SYSVOL\YOURDOMAIN\Policies\PolicyDefinitions on your server. After that you start your policy editor and you will find it under the section administrative templates.
admin on June 24th 2010 in Windows Server
You need to set a registry key to really see all files.
In:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\
Set following DWord:
ShowSuperHidden (1)
admin on May 22nd 2010 in Windows
You know the problem after a fresh windows installation. First you need to do all the windows updates and this takes some time to do it manually. This is the reason why I developed this script. I actually developed it for a packet manager called enteo but it can also be used without it.
Just download it and read the readme file carefully.
It is written in vbscript and can be easily adjusted to your packet manager. Use of course at your own risk!
PSWUInstaller100 4kb
admin on May 21st 2010 in Windows, Windows Server
1. Create a local user like Template
2. Login as this user and make all your adjustments
3. Best Restart your Computer
4. Login as Domain Administrator
5. Set your Explorer up so you can see all Hidden Files and Folder and System Files
6. Rename C:\Users\Default User in C:\Users\Default User Old
7. Rename your new Profile C:\Users\Template into C:\Users\Default User
8. Go to the Computer Settings [Windows Key+Break]
9. Go to the Users Profile and choose your Default User
10. Then click on Copy To and don’t forget to set the permissions to everybody
11. IMPORTANT: Copy the file into %logonserver%\netlogon\Default User.v2
Don’t forget to put .v2 or you would just generate a profile for XP.
admin on May 20th 2010 in IT, Windows, Windows Server
Screen is a terminal multiplexer. It is very useful if you want to run multiple programs/scripts at the same time and want to switch between them. You don’t need to open another terminal for it and it even keeps them running when you logoff from the terminal.
To install screen type:
#apt-get install screen
To run it type
#screen
Here a couple of useful shortcuts (C stands for Ctrl)
| Shortcut |
Description |
| C-a c |
Create a new window |
| C-a n |
Jump to the next window |
| C-a p |
Jump to the previous window |
| C-a A |
Set a window name |
| C-a “ |
Overview of all windows |
| C-a K |
Close window (kill) |
| C-a d |
Detach screen |
| C-a S |
Split screen horizontally |
| C-a | |
Split screen vertically |
| C-a Q |
Remove splits |
| C-a {Tab} |
Switch between the window |
To reattach a screen type:
#screen -r
admin on May 19th 2010 in Linux
Tracert like in windows wit ICMP Echo request
#traceroute www.google.com –I
Show Routing Table
# nestat –nr
# route –n
Connection Statistic
# nestat –i
# mii-diag
Network Connections and Bind Ports
# netstat –a
Check DNS Settings
# dig www.google.com
# dig www.google.com mx
# nslookup www.google.com
I had to install the packages first to use this commands:
# apt-get install dnsutils
TCPDUMP
It is a very useful Network Sniffer for Linux. But first you need to install it:
# apt-get install tcpdump
Ex.
# tcpdump –nli eth0 port 80
# tcpdump –nli eth0 host 192.168.1.100 and port 80
# tcpdump –nli eth0 host 192.168.1.00 and not port 22
# tcpdump –nli eth0 src host 192.168.1.00 and not port 22
admin on May 18th 2010 in IT, Linux
Check the state
# ifconfig –a
Activate/Deactivate Network Interface
# ifup eth0
# ifdown eth0
Hostname
# hostname
# uname -n
# vi /etc/hostname
Get an IP from the DHCP Server
# dhclient
Edit this file to setup a fix IP
#vi /etc/network/interfaces
auto eth0
iface eth0 inet static
address 192.168.0.25
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.5.1
# /etc/init.d/networking restart
Edit this file to setup DNS
#vi /etc/resolv.conf
order hotsts, bind
domain mydomain.local
nameserver 192.168.0.10
admin on May 17th 2010 in IT, Linux, Network
1. Delete all Snapshots or you can’t resize the disk
2. Shutdown Guest System
3. Go into Guest Properties and increase the disk size
4. Start Guest System
5. Create a Snapshot again
Windows Server Resize Partition
1. Download and install Diskpart from the Microsoft Webpage
2. Go into Command Console
3. Type: Diskpart
> LIST DISK
> SELECT DISK 0 [replace number with the disk you want to extend]
> LIST VOLUME
> SELECT VOLUME 1 [replace number with volume you want to extend]
> extend
Windows XP Resize Partition
Unfortunately Diskpart didn’t work for my Windows XP Version even it suppose to be supported. Anyway after try and error I found a good open source Partition Manager like Partition Magic. It is called GParted and It is based on Linux and does a great job. You can get it here: http://gparted.sourceforge.net/
admin on May 11th 2010 in VMWare, Windows, Windows Server
Create Groups
# group add finance
# group add development
# group add others
Create User and Assign to Groups
# useradd –m –g finance –G development,others –s /bin/csh testuser
Information about a User
# id testuser
# groups testuser
Modify and Delete a User
# usermod testuser
# userdel –r testuser
Deactivate User Account
# usermod –L testuser
Switch to a user and move to home directory
# su – testuser
Set a Password for a User
# passwd testuser
Set Password Policies
# chage testuser
User, Groups and Password Database
# /etc/passwd
# /etc/groups
# /etc/shadow
Template Directory for Home Folder
# /etc/skel/
admin on April 29th 2010 in Linux