Diary

May 20, 2010

Windows authentication and run as

Filed under: Uncategorized — Himanshu @ 5:58 am

We have multiple DCs in our organization for a reason, and we need to access SQL Server hosted on different DC several times. To login into SQL Server using windows authentication I use following:

C:\Windows\System32\runas.exe /netonly /user:<different domain name>\<username of different domain name”> "C:\Program Files\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\Ssms.exe"

February 24, 2010

Cisco VPN throwing error as “Failed to enable Virtual Adapter”

Filed under: Uncategorized — Himanshu @ 10:50 am

In Windows 7, I have see this error many times when trying to connect using Cisco VPN Software.

failed to enable virtual adapter

I could resolve the issue by

  1. Enable Cisco Network adapter
  2. Diagnose the adapter by option given in context menu
  3. Disable adapter
  4. Try connecting to the network again

Update: If above do not solve the problem and surprisingly it wouldn’t sometime! Restart the machine.

January 8, 2010

Linux, setting system wide variable

Filed under: Uncategorized — Himanshu @ 12:11 pm
 
my-box:~$ sudo su -
Password:
root:~# cat >> /etc/profile
JAVA_HOME=/usr/lib/jvm/java-6-sun
export JAVA_HOME
root:~# 

January 1, 2010

refcardz.dzone

Filed under: Uncategorized — Himanshu @ 5:20 pm

 http://refcardz.dzone.com/

I  like some of the cards, can really give a good quick start on sometime.

See also: db4o

Filed under: to-do — Himanshu @ 5:09 pm

Should try out db4o. It’s open source object oriented database. Has native support for Java and .NET both. Looks like also has something for Mono.

December 8, 2009

TedTalk session bookmarks

Filed under: ted-talk — Himanshu @ 3:01 pm

Richard Dawkins on our "queer" universe
http://www.youtube.com/watch?v=1APOxsp1VFw

Elizabeth Gilbert: A new way to think about creativity
http://www.youtube.com/watch?v=86x-u-tz0MA

Stephen Hawking: Asking big questions about the universe
http://www.youtube.com/watch?v=xjBIsp8mS-c&feature=channel

Tony Robbins: Why we do what we do, and how we can do it better

http://www.youtube.com/watch?v=Cpc-t-Uwv1I

Barry Schwartz: The paradox of choice
http://www.youtube.com/watch?v=VO6XEQIsCoM

September 8, 2009

SQL Server DB Diff and Sync

Filed under: Uncategorized — Himanshu @ 7:49 am

Haven’t tried it but, seems good, though if someone wants to pay, tryout this as well

August 24, 2009

mono issue: Standard output has not been redirected or process has not been started.

Filed under: Uncategorized — Himanshu @ 6:04 am

Fix is found from http://www.debianadmin.com/running-aspnet-applications-in-debian-and-ubuntu-using-xsp-and-mono.html

   1:  
   2:  sudo find /usr/bin | grep gmcs
   3:  
   4:  if result is NOT
   5:  /usr/bin/gmcs
   6:  /usr/bin/gmcs2
   7:  
   8:  try
   9:  1)install mono-gmcs package (if only have “/usr/bin/gmcs”)
  10:  or
  11:  2)in case you have only “/usr/bin/gmcs2? make symlink on it named gmcs
  12:  sudo ln -s /usr/bin/gmcs2 /usr/bin/gmcs

restart apache2 or xsp or your web server and check result in browser.

August 21, 2009

Creating My SQL database and user

Filed under: my-sql — Himanshu @ 7:40 am

I sent email from my hotmail a/c  to my user at server where I had hosted postfix, let’s see if it goes through. See my prior post for the context.

Anyway, this post is for Installed My SQL and PHP. Its pretty easy to install mysql and php in ubuntu. Use apt-get install and you are done. I haven rarely used MySQL, and never used it from command line. After installing mysql also tried creating database as: mysqladmin create <databasename>. Command complainted about password for user. I used switch to supply password and command prompt was on next line. I assumed the command must be successful.

Now, I wanted to setup wordpress. And want to use different database, user then I had created and used in prior command. I wanted to have wp user to do anything on its database, but not more then that.

Googled a bit and found that user can be created in mysql with host specification, found it interesting. (see this). So concept is user can be created with host specification or with wild card (which is % not *). and user will have access to the database accordingly. So same user accessing database from localhost will have more permissions then if s/he access database from outside server.

So, I used following commands to create database and user. This commands needs to be run from mysql command prompt which can be started using mysql –user=root –password=<root-user-password>. I had used root, so you are seeing root user in the command, but any other user who has permission of creating database, creating user and allocating permissions.

   1: CREATE USER '<user-name>'@'localhost' IDENTIFIED BY '<password-for-the-user>';
   2: CREATE USER '<user-name>'@'%' IDENTIFIED BY 'password-for-the-user';
   3: GRANT ALL PRIVILEGES ON <database-name>.* TO '<user-name>'@'localhost';
   4: GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP ON <database-name>.* TO '<user-name>'@'localhost';

Opps, forgot to mention. Please make sure you first create database and then run line 3 and line 4.

August 20, 2009

Setting up email server - 1

Filed under: linux, mail server, ubuntu — Himanshu @ 6:42 am

I was going through ubuntu server edition, where I found that ubuntu comes with a utility called tasksel. That was not installed on my server, so went ahead and did apt-get install for it, and that resolved the issue of not having it.

I did select mail server from it’s checkbox, and it installed successfully after some queries. Well, I’m saying successfully because it didn’t gave me any error. I could see some more process running while I do ps -ef after installation has completed.

But then what next, I was pathless again. I did some more googling over it, and I found http://jonsview.com/2009/03/26/how-to-setup-email-services-on-ubuntu-using-postfix-tlssasl-and-dovecot. I completed what he said but ehlo localhost was not having two lines that he said but below

   1: ehlo localhost
   2: 250-server Hello localhost.localdomain [127.0.0.1], pleased to meet you
   3: 250-ENHANCEDSTATUSCODES
   4: 250-PIPELINING
   5: 250-EXPN
   6: 250-VERB
   7: 250-8BITMIME
   8: 250-SIZE
   9: 250-DSN
  10: 250-ETRN
  11: 250-AUTH DIGEST-MD5 CRAM-MD5
  12: 250-DELIVERBY
  13: 250 HELP

Now, what? Pathless again.

I learn mail command and tried it. It was giving warning as postdrop: warning: unable to look up public/pickup: No such file or directory quick googling lead me to http://ubuntuforums.org/showthread.php?t=666018 which told me that I need to fire command

   1: sudo mkfifo /var/spool/postfix/public/pickup
   2: sudo /etc/init.d/postfix restart

after which warnings disappeared, but mail didn’t reached to hotmail account.

Update-1:

Wow, I killed sendmail process, restarted postfix and I could see the entries that above URL was saying. And also received the emails in hotmail account, in junk as I was expecting it to be.

I was also seeing some process that was indicating my hotmail account in its description. I didn’t understand it so I restarted the server, but will try sending some more emails and update.

Older Posts »

Powered by WordPress