Could not access XP’s shared folder

September 15, 2006

There were 2 Xp machines, first was IDEAL dan the other called WINXP. Both machines were configured in the same workgroup called WORKGROUP. In normal condition when we created 2 username in 2 different machines with identical password, when we shared a folder in one machine, the other machine can access that folder without being asked for username and password.

In this case I had a strange problem, with the same username IDEAL can access WINXP without being asked for username and password, in contrary when WINXP trying to access IDEAL the username and password being asked, and still couldn’t got in although I supply the same username and password.
As a matter of fact this problem already in the Knowledge Base of Microsoft.

========================================
Knowledge Base

Error message when you try to access a Windows XP-based network computer: “You might not have permission to use this network resource”
Article ID: 913628

Article Last Modified on 3/14/2006
——————————————————————————–
APPLIES TO

Microsoft Windows XP Professional
Microsoft Windows XP Home Edition
——————————————————————————–
Important This article contains information about how to modify the registry. Make sure to back up the registry before you modify it. Make sure that you know how to restore the registry if a problem occurs. For more information about how to back up, restore, and modify the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows registry

SYMPTOMS
When you try to access a Microsoft Windows XP-based network computer, you receive an error message that is similar to the following:

XXXXXXX is not accessible. You might not have permission to use this network resource. Access is denied.

Note XXXXX is the IP address or the computer name of the Windows XP-based computer.

You may experience this issue when you use the IP address or the computer name to access a shared folder that is stored on the Windows XP-based computer. You may also experience this issue when you use My Network Places to access a shared folder in this situation.

CAUSE
This issue occurs if the restrictanonymous registry entry is set to a value of 1 on the Windows XP-based computer.

RESOLUTION
Warning Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by using another method. These problems might require that you reinstall your operating system. Microsoft cannot guarantee that these problems can be solved. Modify the registry at your own risk.To resolve this issue, set the value of the restrictanonymous registry entry to 0. To do this, follow these steps:

Click Start, click Run, type regedit in the Open box, and then click OK.
Locate and then double-click the following registry subkey:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa

In the right pane, double-click restrictanonymous.
Make sure that the value in the Value data box is set to 0, and then click OK.
Close Registry Editor.
Restart the computer.
REFERENCES
For more information about the restrictanonymous registry entry, click the following article number to view the article in the Microsoft Knowledge Base:

246261 How to use the RestrictAnonymous registry value in Windows 2000

Keywords: kbtshoot kbprb KB913628
——————————————————————————–
Send feedback to Microsoft

© Microsoft Corporation. All rights reserved.

AddThis Social Bookmark Button

WP-infos 0.3 plugin - how to

September 7, 2006

This plug in is really great, unfortunately this plugin didn’t have a sufficient manual to implement, so here’s the steps you need to take when you want it to show up on your blog.

- Put the wp-infos.php file below your /wp-content/plugins directory.
- Create a table on your WP database
- Put a code on your template (sidebar.php)

Here are the details :
Save this file as wp-infos.php

1. < ?php
2. /*
3. Plugin Name: wp-infos
4. Version: 0.3
5. Plugin URI: http://sebacatalano.altervista.org
6. Description: Show the total visits, the current ip and browser of the user.
7. Author: Seba Catalano
8. Author URI: http://sebacatalano.altervista.org
9. */
10.
11.
12. function wp_infos() {
13.
14. $timeout = "5"; // Timeout, in minutes, to consider a visitor online.
15. $ip = $_SERVER['REMOTE_ADDR']; // Ip of the visitor
16. $browser = $_SERVER['HTTP_USER_AGENT']; // Browser of the visitor
17. $host = $_SERVER['SERVER_NAME']; // Local host name.
18. $referer = $_SERVER['HTTP_REFERER']; // Ref url
19.
20.
21. // Database extraction
22. $query = mysql_query("SELECT * FROM wp_infos WHERE visits != '0'")
23. or die("Error in query: ". mysql_error());
24.
25. $dbarray = mysql_fetch_array($query);
26. $id = $dbarray['id'];
27. $totalcount = $dbarray['visits'];
28. $partialcount = $dbarray['daycount'];
29. $date = $dbarray['daydate'];
30.
31. $online = usr_online($timeout, $ip);
32. counter($id, $totalcount, $partialcount, $host, $date, $referer);
33.
34. // Visualitazion table
35. echo "Total visits: $totalcount
36. Today visits: $partialcount
37. Users online: $online
38. Your IP: $ip
39. Your Browser: $browser";
40. }
41. function usr_online ($timeout, $ip) {
42.
43. $time = time();
44. $less = $time - ($timeout*60);
45.
46. mysql_query("INSERT INTO wp_infos (ip, time) VALUES ('$ip', '$time')") or die("Error in query: ". mysql_error());
47. mysql_query("DELETE FROM wp_infos WHERE time< '$less' AND visits=0") or die("Error in query: ". mysql_error());
48.
49. $query = mysql_query("SELECT COUNT(DISTINCT ip) FROM wp_infos") or die("Error in query: ". mysql_error());
50. $iplist = mysql_fetch_array($query, MYSQL_NUM);
51.
52. return $iplist[0]-1;
53. }
54.
55.
56. function counter ($id, $totalcount, $partialcount, $host, $date, $referer) {
57.
58. // Date
59. $time = getdate();
60.
61. // Vars initialization
62. if (empty($id)) {$id = 0;}
63. if (empty($totalcount)) {$totalcount = 0;}
64. if (empty($partialcount)) {$partialcount = 0;}
65. if (empty($date)) {$date = $time[mday].$time[month];}
66.
67. if (!eregi($host, $referer)) {
68. $totalcount++;
69.
70. if (!strcmp($date, $time[mday].$time[month])) {
71. $partialcount++;
72. }
73. else {
74. $partialcount = 0;
75. $date = $time[mday].$time[month];
76. }
77.
78. // Database entry
79. mysql_query("DELETE FROM wp_infos WHERE visits!=0")
80. or die("Error in query: ". mysql_error());
81.
82. mysql_query("INSERT INTO wp_infos (visits, daycount, daydate) VALUES ($totalcount, $partialcount, '$date')")
83. or die("Error in query: ". mysql_error());
84. }
85. }
86. ?>

You must create a table on your WP database like below (use PHPMyAdmin to do it.)

1. CREATE TABLE `wp_infos` (
2. `id` INT( 10 ) UNSIGNED DEFAULT ‘0‘ NOT NULL AUTO_INCREMENT ,
3. `visits` INT( 20 ) UNSIGNED DEFAULT ‘0‘ NOT NULL ,
4. `daycount` INT( 15 ) UNSIGNED DEFAULT ‘0‘ NOT NULL ,
5. `daydate` VARCHAR( 20 ) NOT NULL ,
6. `ip` VARCHAR(15) NOT NULL,
7. `time` VARCHAR(20) NOT NULL,
8. PRIMARY KEY ( `id` )
9. ) TYPE = MYISAM ;

Last thing you must do is to put code below on your template, usually sidebar.php

1. < ?php if (function_exists('wp_infos')) : ?>
2.
3. < ?php _e('Online'); ?>
4. < ?php wp_infos(''); ?>
5.
6. < ?php endif; ?>

Enjoy,
I hope you like it as much as I do.
Check it out on my site http://www.myonlinebrain.com/biofir

AddThis Social Bookmark Button
eXTReMe Tracker