Monday, October 10, 2011

windows access ubuntu files (file sharing) via Samba

Getting started:

To get started, click ‘Power –> System Settings’

natty_windows__part2

Next, select ‘System –> Ubuntu Software Center’

natty_windows__part2_1

Then search for and install ‘system-config-samba’
system-config-samba
natty_windows__part2_2

After installing, go to ‘Power –> System Settings’

natty_windows__part2

Then, select ‘System –> Samba’

natty_windows__part2_3

Next, select ‘Preferences –> Server Settings’

natty_windows__part2_4

Finally, type the workgroup name you entered earlier on your Windows system and save.
workgroup here is same as the windows group

natty_windows__part2_5

Restart and you’re done.

Now both Windows and Ubuntu systems are member of the same workgroup. If networking is properly configured, you should be able to see both systems within the workgroup you created. The third article in this series will focus on creating shares on both systems so that users on either system can view and access.

From Windows:

natty_windows_share_part2


Creating Shares In Ubuntu 11.04 Natty:

To create shares in Ubuntu Systems, go to ‘Power –> System Settings’

natty_windows_sharing_part3_3

Then select ‘System –> Samba’

natty_windows_sharing_part3

When Samba opens, click Add (Green Plus) to add shares. Next select the directory you wish to share and check the boxes to make it Visible and Writable.

natty_windows_sharing_part3_1

Next, select the ‘Access’ tab and select the users you wish to grant access to it and close out.

natty_windows_sharing_part3_2

That’s all. The directory is shared and users that have access should be able to view and access it remotely from another system.

Finally, add the users that will have access remotely to Samba User Database. To do that type the command below for each user:
sudo smbpasswd -a USERNAME
Replace USERNAE with a valid username on the Ubuntu system. You will be prompted to create a new Samba password for the user.

To access Windows shares, open your Home Folder and select “Network” then double click on the system you wish to access. When prompted, type your Windows’ username and password and click ‘Connect’

natty_windows_sharing_part3_4


Connect ubuntu files by using "richard"'s password on windows side.

Sunday, October 9, 2011

Ubuntu - remove remote desktop "Enter Password To Unlock Your Login Keyring""

To remove the screen on startup which says "Enter Password To Unlock Your Login Keyring"
sudo rm ~/.gnome2/keyrings/login.keyring



In GUI way:
Step-1: Ubuntu main menu -> Applications -> Accessories -> Passwords and Encryption Keys

Step-2: In Passwords tab, right click Passwords: login. In the menu select Change Password… option.




Step-3: Enter your old login password and new login passwords.

You are done. 

Next time, it won’t ask for any login password for GNOME keyring. 
If Ubuntu integrate this change while changing the user password,
 it would be better user experience.

Monday, October 3, 2011

Configure Dropbox as a service

First, run the Dropbox installer using the command line switch /D=C:\Program Files\Dropbox (with no quotes) to install Dropbox into the Program Files directory for all users.
Then here an updated version of the procedure given on this link:
Since Dropbox will normally only work when a user is logged in, we will have to install and use it first via remote desktop, before it can be turned it into a Service.
  1. Remote desktop to your WHS as administrator
  2. Get DropBox from their website.
  3. Install and configure Dropbox as you like. e.g. I made a special share on my WHS named Dropbox before the installation and linked Dropbox to this share. Then exit dropbox from the system tray.
  4. Similar to Foldershare, you will need instsrv.exe and srvany.exe from the Windows Server 2003 Resource Kit Tools.
  5. Copy instsrv.exe to C:\Program Files\Dropbox
  6. Copy srvany.exe to C:\Program Files\Dropbox
  7. execute "C:\Program Files\Dropbox\instsrv.exe" Dropbox "C:\Program Files\Dropbox\srvany.exe"
  8. execute reg ADD HKLM\SYSTEM\CurrentControlSet\Services\Dropbox\Parameters /v Application /d "C:\Program Files\Dropbox\Dropbox.exe"
  9. execute reg ADD HKLM\SYSTEM\CurrentControlSet\Services\Dropbox\Parameters /v AppDirectory /d "C:\Program Files\Dropbox"
  10. Delete or move the shorcut to Dropbox away from the startfolder (Start -> All Programs -> Startup) on the startmenu.
  11. Move (cut/paste) ALL the files from C:\Documents and Settings\Administrator\Application Data\DropBox to C:\Documents and Settings\Default User\Application Data\Dropbox
  12. execute net start Dropbox


After you're done: Start > Run > "services.msc"
Find your "Dropbox" service.
Right click on it and select "Properties" goto the "Log On" tab and make sure the "Allow service to interact with desktop" checkbox is checked.
Start/Restart the service as necessary.
You will either get a popup asking for permission to show the Dropbox configuration or the Dropbox configuration will just come up.
Put in your username/password, choose where you want to place your Dropbox (under the particular user you want) and you're good to go.
Verified to work on Windows Server 2008.

Sunday, October 2, 2011

老子智慧:知者不言,言者不知

知者不言,言者不知。塞其兑,闭其门,挫其锐,解其纷,和其光,同其尘,是谓玄同。故不可得而亲,不可得而疏;不可得而利,不可得而害;不可得而贵,不可得而贱。故为天下贵。

智慧深澈的人实施超脱语言的教化,喜欢高谈阔论的人往往并没有多少真知。摒弃一切感知,停止向外追求,以求得内心的宁静清澈;挫磨掉锐气、锋芒和棱角,消 除种种人为限制,突破重重心灵障碍,使心灵纯真质朴;收敛起光泽避免无谓争夺,混同尘世凡物:这就叫做玄妙的同化,微妙大统一的法门。所以没法亲近他,也 没法疏远他;没法给他好处,也没法损害他;没法抬高他,也没法贬低他。所以他才真正成为天下最可贵的

Friday, September 30, 2011

巴菲特所持10只高股息股票

 新浪财经讯 北京时间9月30日下午消息,据外电报道,根据“股神”巴菲特麾下伯克希尔-哈撒韦公司最新披露的季度监管文件显示,财经网站TheStreet.com列出了巴菲特所持的10只高股息股票。



股息排名
个股名称
最近的季度股息
占巴菲特投资组合的比重
市值(亿美元)
市盈率
1
葛兰素史克公司(GSK)
5%
0.1%
1066
20.7
2
康菲石油(COP)
4%
4.2%
917
8.4
3
赛诺菲(SNY)
4%
0.3%
889
19.6
4
M&T银行(MTB)
3.9%
0.9%
90
10.2
5
通用电气(GE)
3.7%
0.3%
1715
12.6
6
强生(JNJ)
3.6%
5.4%
1758
15.3
7
宝洁(PG)
3.3%
9.3%
1754
16.2
8
卡夫食品(KFT)
3.3%
5.7%
616
20.2
9
UPS(UPS)
3.2%
0.2%
485
16.2
10
Gannett(GCI) (媒体股)
3.2%
0.05%
24
4.5

Friday, September 23, 2011

Mac OS Lion: New Wi-Fi Diagnostics tool & Troubleshooting Solutions

Inside Mac OS X 10.7 Lion: New Wi-Fi Diagnostics tool
http://www.appleinsider.com/articles/11/03/15/inside_mac_os_x_1

WiFi Dropping in OS X Lion? Here are Some Wireless Troubleshooting Solutions
http://osxdaily.com/2011/07/22/wifi-dropping-in-os-x-lion-fixes

Wednesday, September 14, 2011

How to delete database data file

1.DBCC SHRINKFILE('logical_file_name', EMPTYFILE).
2.After that, the file dropped with no problems.