Monday, February 8, 2010

Domain users cannot restart/shutdown the client PC

To Edit the Group Policy in a Domain

  1. Start the Active Directory Users and Computers snap-in. To do this, click Start, point toPrograms, point to Administrative Tools, and then click Active Directory Users and Computers.
  2. In the console, right-click your domain, and then click Properties.
  3. Click the Group Policy tab.
  4. In the Group Policy Object Links box, click the group policy for which you want to apply this setting. Click Default Domain Policy.
  5. Click Edit.
  6. Expand Computer Configuration, expand Windows Settings, expand Security Settings, expand Local Policies, and then click Security Options.
  7. In the right pane, double-click Allow to shutdown the system.
  8. Click Add User or Group, and then type User or Group then click OK.
  9. Close the Group Policy editor, and then click OK.

You cannot log on because the logon method you are using is not allowed on this computer

To Edit the Local Policy on a Windows(2000/XP/Vista)-Based Computer


  1. Click Start, and then click Run.
  2. In the Open box, type gpedit.msc, and then click OK.
  3. Expand Computer Configuration, expand Windows Settings, expand Security Settings, expand Local Policies, and then click User Rights Assignment.
  4. In the right pane, double-click Allow log on locally.
  5. Click Add User or Group, and then type User or Group then click OK.

    NOTE: If domain-level policy settings are defined, they may override this local policy setting.
  6. Quit Group Policy Editor.
  7. Restart the computer.

To Edit the Group Policy in a Domain


  1. Start the Active Directory Users and Computers snap-in. To do this, click Start, point toPrograms, point to Administrative Tools, and then click Active Directory Users and Computers.
  2. In the console, right-click your domain, and then click Properties.
  3. Click the Group Policy tab.
  4. In the Group Policy Object Links box, click the group policy for which you want to apply this setting. Click Default Domain Policy.
  5. Click Edit.
  6. Expand Computer Configuration, expand Windows Settings, expand Security Settings, expand Local Policies, and then click User Rights Assignment.
  7. In the right pane, double-click Allow log on locally.
  8. Click Add User or Group, and then type User or Group then click OK.
  9. Close the Group Policy editor, and then click OK.


Troubleshooting

Group Policy changes are not immediately enforced. Group Policy background processing can take up to 5 minutes to be refreshed on domain controllers, and up to 120 minutes to be refreshed on client computers. To force background processing of Group Policy settings, use the Secedit.exe tool. To do this:
  1. Click Start, and then click Run.
  2. In the Open box, type cmd, and then click OK.
  3. Type secedit /refreshpolicy user_policy, and then press ENTER.
  4. Type secedit /refreshpolicy machine_policy, and then press ENTER.
  5. Type exit, and then press ENTER to quit the command prompt.

If your computer does not turn off the power when doing a shutdown

1.Start Regedit
2.Go to HKEY_CURRENT_USER\Control Panel\Desktop
3.Edit the key PowerOffActive and give it a value of 1
4.You can do the same in HKEY_USERS\.DEFAULT\Control Panel\Desktop

Creating a Shutdown/Reboot Icon.

Windows 2000/XP/Vista has a program called SHUTDOWN.EXE which allows you to easily create icons to shutdown or restart your computer.

To create a shutdown shortcut on the desktop:
1.Right click on an open area of the desktop
2.Select New --> Shortcut
3.Type the command "shutdown -s -t 00" - no quotes
4.Press the Next button
5.For the name, enter in anything you like. I just use shutdown. Click on the Finish button.

For a reboot, enter "shutdown -r -t 00"
Shutdown [{-l|-s|-r|-a}] [-f] [-m [\\ComputerName]] [-t xx] [-c "message"] [-d[p]:xx:yy]
Parameters
-l - Logs off the current user, this is also the defualt. -m ComputerName takes precedence.
-s - Shuts down the local computer.
-r - Reboots after shutdown.
-a - Aborts shutdown. Ignores other parameters, except -l and ComputerName. You can only use -a during the time-out period.
-f - Forces running applications to close.
-m [\\ComputerName] - Specifies the computer that you want to shut down.
-t xx - Sets the timer for system shutdown in xx seconds. The default is 20 seconds.
-c "message" - Specifies a message to be displayed in the Message area of the System Shutdown window. You can use a maximum of 127 characters. You must enclose the message in quotation marks.

Friday, February 5, 2010

How to assign a domain name to your home web server

Read this first.......

A dynamic DNS service is a constantly updated database of IP addresses and domain names. DynDNS.com is one provider of this service. For free, you can get one of the available DynDNS domain names plus a custom subdomain (like lifehacker.getmyip.net), or for a small fee you can register your own domain (like joesmith.com) and have it resolve to your home computer web server with DynDNS.

Here's how:

Step 1. Set up your DynDNS.com account.

Register for a free account at DynDNS. Agree to the site's terms, and use a legitimate email address to complete registration. Once in awhile, DynDNS will email you at that address asking you to confirm that it continue your service.

Log into your new account. Go to the "My Services" area on the left side. Under "Host Level Services" click "Add Host Services." There, click "Add Dynamic DNS Host." DynDNS will autofill your IP address (if you're doing this from your home computer). Choose a domain and type in a custom subdomain, which can be anything from lifehacker.kicks-ass.org or john.is-a-geek.com or gtrapani.dyndns.org, like below:

Step 2. Set up your computer to update DynDNS.

Now that your computer is registered with DynDNS, each time your computer's IP address changes, it has to let DynDNS know. This can be done either with free updater client software or through your router.

If your computer is connected directly to the Internet, download the DynDNS updater client for Mac or Windows here. Install and enter your DynDNS information so that your computer can update DynDNS's database regularly.

If you are behind a router, you're in luck. Most modern routers support dynamic DNS services. Here's a screenshot from my router's interface (yours will look different) for with DynDNS settings:

Step 3. You're done. Give your new domain a spin!

Type your new domain name by entering it in your web browser's address bar. It should resolve to your home server. From here you can publicize or bookmark your server's new domain name no matter how often your IP address changes.

Notes: DynDNS has a few advanced options to consider.

  • "Enable wildcard" lets you set up sub-subdomains. For example, blog.johnsmith.mine.nu can resolve to a weblog, where jukebox.johnsmith.mine.nu can resolve to a music directory. Virtual hosts must be configured for your Apache web server to display the right site when addressed by different subdomains.
  • Set up an MX record to handle email handling to your home server.
  • Upgrade your account assign a custom domain name or your choosing to your home server as well, for about 25 bucks a year. See more info on Custom DNS.

How to control your home computer from anywhere

The Virtual Network Computing (VNC) protocol remotely controls another computer over a network. Think of it as a window into your home computer's desktop from any other computer. Your key presses and mouse clicks get transferred over the network and happen on the remote computer in real time, and anyone at the remote computer can watch the action as it happens.

A few things you can do with a VNC server running at home:

  • Start a downloading a large file, like a movie, in the morning so it's there when you get home in the evening
  • Search your home computer's IM logs, address book or file system for important information
  • Help Mom figure out why Microsoft Word doesn't start without having to go to her house (even though Mom would like to see you more often)
  • Control a headless (monitor-less) machine like a media center or file server in another room in the house from the laptop on the couch

VNC requires two components for a successful connection: the server on your home computer, and the viewer on the remote computer. Let's set up each component to get going. Here's how.

Step 1. Install the VNC server.

Windows users: TightVNC is free Windows VNC server and client software. TightVNC is a nice choice because it also allows for file transfers and high compression levels for slow connections. Download TightVNC from here and run the installation on your home computer. Start the server, and set a password for incoming connections.

TightVNC can be set to run as a Windows service, which means your Windows usernames and passwords can be used to authenticate on the VNC server connection. Be sure all your Windows passwords are set and strong, and that any passwordless guest accounts are disabled.

Mac users: OSXvnc is a free Mac VNC server. Download, install, set up a password and start the server.

If your VNC server is connected directly to the Internet, it is now listening for Internet requests on port 5900, VNC's default port (which is also configurable). Visit WhatIsMyIP from your home computer to determine its IP address and write it down.

Step 2. Install the VNC client.

On the remote Windows computer, also download and install TightVNC, but this time, start the viewer, NOT the server. If you're on a Mac, download the free Chicken of the VNC Mac viewer to connect to your home PC. Enter your home computer's IP address and password to connect.

Here's a screengrab of a VNC connection to my Windows PC from my Mac. Click on the image to see a larger version.

And that's that! You're virtually sitting at your home desktop from anywhere in the world.

A few extra VNC tips to chew on:

  • For slower network connections, set the compression to "best." The window image quality will be lower, but the connection response will be snappier.
  • Bring a VNC viewer with you on a USB memory stick so you don't have to download and install on every computer you want to use to connect to your server.
  • Avoid having to install a server on Mom's computer; email her the 166K self-extractingSingleClick UltraVNC server for your next tech support phone session. More on SingleClick in an upcoming Lifehacker feature.

How to access a home server behind a router/firewall

For users on a home network with a router installed, home servers are not accessible from the Internet because of many modern routers' built-in firewall.

Today we'll cover how to open up specific ports on your router to allow access to a home server behind a firewall.

Please note: this tutorial is for advanced users. Your router's firewall is there to protect you from evildoers who try to control your computer over the Internet. Make sure that any service you expose to the Internet is secured with a strong password.

Enabling outside access to an internal computer on a home network requires that you set up NAT - "network address translation," or port forwarding. Forwarding sends requests for ports on the outside of your firewall to the right computer on the inside.

For instance, someone on the outside requests a page from a web server at your router's IP address. With port forwarding set up, your router knows to forward requests for port 80 (a web server's default port) to the computer with the web server running only - and none of the others on your network.

Port forwarding is only necessary when you want to expose a service to computers on the Internet outside your firewall. Some servers you'd want to do that with:

  • a home web server
  • a personal wiki
  • a BitTorrent client uploading as well as downloading
  • a VNC server
  • a home FTP server

While all routers vary slightly, port forwarding is fairly simple. Here's how to get it set up:

Step 1. Determine your server's internal IP address.

All the computers on your internal network have an IP address which looks something like 192.168.0.XXX. Get on the computer with the server running and open a command window. Then type ipconfig to determine the machine's internal address, like so:

C:\Gina>ipconfig  Windows IP Configuration   Ethernet adapter Local Area Connection:          Connection-specific DNS Suffix  . :         IP Address. . . . . . . . . . . . : 192.168.0.11         Subnet Mask . . . . . . . . . . . : 255.255.255.0         Default Gateway . . . . . . . . . : 192.168.0.1 

In this case, as you can see, the server's internal IP address is 192.168.0.11.

Step 2. Configure your router.

Most routers have an web-based administrative interface that's located at http://192.168.0.1. (This address does depend on your model. Consult your router user guide for more info.)

Once you've gone to the router administration, entered the password (if one is set up), there should be an area called "Port forwarding." There, you'll set the port number that requests from the Internet will come in, and the internal computer that should fulfill those requests. Here's a screenshot of my Netgear router set up to port forward 5900 to my VNC server, which is at 192.168.0.11 (see above). Click on the image to see a larger version.

Here's a table of common services and their default port numbers.

ServicePort number
Web server80
VNC (remote control)5900
Instiki wiki2500
FTP21
BitTorrent6881-6990