My SysAd BlogMy SysAd BlogMy UNIX-based blog covers a collection of tips for installations, programming, scripting, configuration, SQL, maintenance, troubleshooting, and command line syntax. What exactly is UNIX? Unix stands for UNiplexed Information and Computing System--ori Articles
Protect your Site Against Questionable Redirects and Frames
2008-05-10 10:29:00 After reviewing statistics for my topsite blog directory, I observed traffic from a website that uses redirects and frames to exploit my website with questionable advertisements (porn). Here is the format: http://????????.com/go/?/301??/http://www .topbloglists.com. I inserted the "?" as substitutes.Obviously, I felt my site was being hijacked and I was miffed. But this was not the first time this happened to me.Approximately two months ago, I emailed the webmaster three times requesting their members NOT be allowed to employ links that use frames to create banner-like ads above my pages. I never received a response to my emails, but the activity did stop until today.Luckily, I found this script to deal with the issue. Place it within the . Here is the script's source along with a post on questionable linking.
Shell Based Random Number Generator
2008-05-09 20:20:00 I observed a a few searches in my metadata stats for a shell based random generator. I know Korn, Bash, and Z Shell shells support a RANDOM variable. Depending on the shell, I will use a print and/or echo command to output its value. The pseudo-random generator outputs an integer between 0 and 32767 - yes, a very limited range. Here are a few examples for these three different shells.Korn Shell# ksh# echo $RANDOM23508# echo $RANDOM22618# echo $RANDOM1864# echo $RANDOM $RANDOM4958 29989# print $RANDOM30418# print $RANDOM4992# print $RANDOM $RANDOM $RANDOM29436 27342 12946Seed the sequence of numbers# RANDOM=100# print $RANDOM12662# echo $RANDOM23392# RANDOM=100# echo $RANDOM12662# echo $RANDOM23392Bash Shell# bash# echo $RANDOM3107# echo $RANDOM7897Z Shell# zsh# print $RANDOM32274# for i in {1..10}for> dofor> print $RANDOMfor> done1074012659949827983541103842121615221 2215715198Seed the sequence of numbers# RANDOM=`date '+%H%S'`# echo $RANDOM12488# echo $RANDOM5266 More About: Random , Generator , Number
Insightful Quotes by the Revered Physicist Albert Einstein
2008-05-03 03:48:00 Here are some insightful quotes by the revered physicist Albert Einstein . I used an echo statement to act as a delimiter, especially towards the bottom of the list. I do not know who Kevin Harris is but it must have taken him awhile to compile this list. echo "Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction." echo "Imagination is more important than knowledge." echo "Gravitation is not responsible for people falling in love." echo "I want to know God's thoughts; the rest are details." echo "The hardest thing in the world to understand is the income tax." echo "Reality is merely an illusion, albeit a very persistent one." echo "The only real valuable thing is intuition." echo "A person starts to live when he can live outside himself." echo "I am convinced that He (God) does not play dice." echo "God is subtle but he is not malicious." e... More About: Quotes
Reset User Account Password Example for MySQL
2008-04-24 09:38:00 Recently I upgraded a legacy application on my server. After the upgrade, I had to reset a user account's password to match the one in the application's configuration file. Luckily, MySQL provides a utility to handle this fairly straightforward task. Here is the syntax and a couple examples.mysql> use mysql;Database Changedmysql> set password for 'elforum'@'localhost' = password('98m4@9er');Query OK, 0 rows affected (0.00 sec)mysql> set password for 'mysysad'@'localhost' = password('950v4.Kr');Query OK, 0 rows affected (0.00 sec)mysql> select user, password from user;+---------------+------------------- ------------------------+| user | password |+---------------+----------------------- --------------------+...| elforum | *EAE7DE143B1B9598745AD571885A98E723ABE905 6 || mysysad | *Ebe7D596878627EDD581EADEFSA98E723ABE9C58 |... More About: Password , User , Mysql , Account , Reset
My SysAd Blog Changes Domain Name
2008-04-20 10:06:00 I finally implemented the domain name, www.mysysad.com, for My SysAd Blog . I had been reluctant to change the name because I had heard nightmare stories where a site?s traffic dries up overnight. But apparently Blogger does a decent job forwarding requests to your new domain. I have not really noticed a drop off. Knock on wood though?I found my domain registrar, yahoo, Advanced DNS settings to be somewhat limited. I had no problems setting up the canonical name (www.mysysad.com) to Google?s ghs.google.com, which is a load balanced server array, but setting up the A record for mysysad.com has been annoying. Unless the A record is pointing to an explicit hostname IP, yahoo will not allow it. I was trying to set it to ghs.google.com. Moreover, Blogger will not forward requests for mysysad.com to www.mysysad.com, even if told to do so in the publishing backend. It goes to the ?parked page.? I had to set an explicit IP for Blogger to work on the non-www version. I sent yahoo an email a... More About: Domain , Domain Name
Create User Account Example for MySQL
2008-04-18 17:35:00 Lately, I have been adding several user accounts to the mysql database. Since I have seen several queries via my metadata provider to create user accounts in MySQL, I have decided to add a post about it. There are three different methods that can be used to create user accounts and they are fairly straightforward.mysql> use mysql;Database changedMethod 1: (create user, password - no privileges)mysql> CREATE USER 'esoft'@'localhost' IDENTIFIED BY '12wer56hi';Query OK, 0 rows affected (0.16 sec)--grant certain privilegesmysql> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP ON *.* TO 'esoft'@'localhost';Query OK, 0 rows affected (0.00 sec)--grant all privilegesmysql> GRANT ALL ON *.* TO 'esoft'@'localhost';Query OK, 0 rows affected (0.00 sec)Method 2: (create user/password and grant all privileges at one fell swoop)mysql> GRANT ALL ON *.* TO 'topblog'@'localhost' IDENTIFIED BY 'topblog123';Query OK, 0 rows affected (0.00 sec)Method 3: (Insert user, password and privi... More About: User , Mysql , Account , Create
Create Database and Migrate Data Example for MySQL
2008-04-15 15:37:00 Over the weekend, I was supposed to be preparing for my second Toastmaster's speech which is "organizing your speech." I really dislike public speaking and that was the primary reason I joined up - basically facing my fears. I did the ?Icebreaker? speech about three months ago and decided it was time to do another one a couple weeks ago. Predictably, I found everything else in the world to do, except preparing for my speech. All of sudden, I decided it was "time" to setup a MySQL server, Apache webserver, FTP server, PHP and another CMS interface. I have wanted to install another instance of my website on a local box, but I guess I just needed an impetus (i.e. speech preparation avoidance) to get it done. I performed the setup twice because I had some issues with the initial run and wanted to get it done right. I had enough time, right? Smile. The part I didn't like was the data migration (always seems like dead time). But anyways, here is how I handled that part from an ex... More About: Data , Database , Mysql , Create , Migrate
Create Database and Migrate Data Example for MySQL
2008-04-15 15:37:00 Over the weekend, I was supposed to be preparing for my second Toastmaster's speech which is "organizing your speech." I really dislike public speaking and that was the primary reason I joined up - basically facing my fears. I did the ?Icebreaker? speech about three months ago and decided it was time to do another one a couple weeks ago. Predictably, I found everything else in the world to do, except preparing for my speech. All of sudden, I decided it was "time" to setup a MySQL server, Apache webserver, FTP server, PHP and another CMS interface. I have wanted to install another instance of my website on a local box, but I guess I just needed an impetus (i.e. speech preparation avoidance) to get it done. I performed the setup twice because I had some issues with the initial run and wanted to get it done right. I had enough time, right? Smile. The part I didn't like was the data migration (always seems like dead time). But anyways, here is how I handled that part from an ex... More About: Data , Database , Mysql , Create , Migrate
Truncate Table Example for MySQL
2008-04-11 17:57:00 I have been upgrading my phpbb forum from 2.X to 3.X. It has been a slog so far and mostly due to spammers. Before the 3.X converter would allow me to complete the conversion process, I had to delete most of the spammer usernames because they were essentially dups (e.g. User, USer, user, etc) but with different UID's . There were about 7,000 rows in the phpbb_user table - now there is a fraction of that left. Good.Anyways, after exporting approximately 7000 rows to a file, I truncated the table. Here is an example.TRUNCATE TABLE `phpbb_users`;Here is the cleaned up (unique usernames) version of the file, which was re-ingested into the phpbb_users 2.X table.INSERT INTO `phpbb_users` VALUES(2, 1, 'adam123', '49ad5...,NULL);INSERT INTO `phpbb_users` VALUES(3, 1, 'laurahing', 'a3dcb4d2..., NULL);INSERT INTO `phpbb_users` VALUES(4, 1, 'joshman', '49ad5b0771f..., NULL);INSERT INTO `phpbb_users` VALUES(5, 0, 'ipsofacto', 'b63fc..., NULL);INSERT INTO `phpbb_users` VALUES(6, 1,... More About: Mysql , Table
Truncate Table Example for MySQL
2008-04-11 17:57:00 I have been upgrading my phpbb forum from 2.X to 3.X. It has been a slog so far and mostly due to spammers. Before the 3.X converter would allow me to complete the conversion process, I had to delete most of the spammer usernames because they were essentially dups (e.g. User, USer, user, etc) but with different UID's . There were about 7,000 rows in the phpbb_user table - now there is a fraction of that left. Good.Anyways, after exporting approximately 7000 rows to a file, I truncated the table. Here is an example.TRUNCATE TABLE `phpbb_users`;Here is the cleaned up (unique usernames) version of the file, which was re-ingested into the phpbb_users 2.X table.INSERT INTO `phpbb_users` VALUES(2, 1, 'adam123', '49ad5...,NULL);INSERT INTO `phpbb_users` VALUES(3, 1, 'laurahing', 'a3dcb4d2..., NULL);INSERT INTO `phpbb_users` VALUES(4, 1, 'joshman', '49ad5b0771f..., NULL);INSERT INTO `phpbb_users` VALUES(5, 0, 'ipsofacto', 'b63fc..., NULL);INSERT INTO `phpbb_users` VALUES(6, 1,... More About: Mysql , Table
Free Anti-virus Software Solution
2008-04-06 06:14:00 If you are like me, you are always searching for ways to protect your personal computer. Probably, the first thing that comes to mind is viruses and worms.Along with millions of other AVG users, I have been using their free anti-virus software version off and on since 1997. Usually, when something is for free, you get what you paid for - sub par performance. But with AVG, I can't complain too much about their free non commercial anti-virus solution. Why? It has been easy to use, consumes low system resources, automatic update functionality and provides real time protection. If you want more services, such as anti-spyware, anti-rootkit, anti-spam, firewall, web shield or 24/7 support, you will have to pay for them. The free version supports most Windows and Linux platforms. As usual, this is not a paid post and other free anti-virus solutions/suggestions are welcome.Note: Per AVG's website: AVG Anti -Virus Free is only available for single computer use for home and non commercial us... More About: Software , Anti-Virus
Free Anti-virus Software Solution
2008-04-06 06:14:00 If you are like me, you are always searching for ways to protect your personal computer. Probably, the first thing that comes to mind is viruses and worms.Along with millions of other AVG users, I have been using their free anti-virus software version off and on since 1997. Usually, when something is for free, you get what you paid for - sub par performance. But with AVG, I can't complain too much about their free non commercial anti-virus solution. Why? It has been easy to use, consumes low system resources, automatic update functionality and provides real time protection. If you want more services, such as anti-spyware, anti-rootkit, anti-spam, firewall, web shield or 24/7 support, you will have to pay for them. The free version supports most Windows and Linux platforms. As usual, this is not a paid post and other free anti-virus solutions/suggestions are welcome.Note: Per AVG's website: AVG Anti -Virus Free is only available for single computer use for home and non commercial us... More About: Software , Anti-Virus
Create table and Insert into Examples for MySQL
2008-04-01 15:09:00 A couple of days ago I was adding entries to my ban related tables via phpbb's administration tools. After awhile, I quickly tired of serially adding an entry and then submitting it. I decided to dump the three tables in question and then modify them by hand. Plus that, I wanted to review the MySQL syntax.Here are a series of create and insert statements for MySQL. I modified some of the entry values with "x", "!", "?" as to not offend some readers.SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";---- Table structure for table `phpbb_banlist`--CREATE TABLE `phpbb_banlist` ( `ban_id` mediumint(8) unsigned NOT NULL auto_increment, `ban_userid` mediumint(8) NOT NULL default '0', `ban_ip` varchar(8) NOT NULL default '', `ban_email` varchar(255) default NULL, PRIMARY KEY (`ban_id`), KEY `ban_ip_user_id` (`ban_ip`,`ban_userid`)) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=97 ;---- Dumping data for table `phpbb_banlist`--INSERT INTO `phpbb_banlist` VALUES(84, 0, '', '*@fromru.c... More About: Examples , Mysql , Create
Create table and Insert into Examples for MySQL
2008-04-01 15:09:00 A couple of days ago I was adding entries to my ban related tables via phpbb's administration tools. After awhile, I quickly tired of serially adding an entry and then submitting it. I decided to dump the three tables in question and then modify them by hand. Plus that, I wanted to review the MySQL syntax.Here are a series of create and insert statements for MySQL. I modified some of the entry values with "x", "!", "?" as to not offend some readers.SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";---- Table structure for table `phpbb_banlist`--CREATE TABLE `phpbb_banlist` ( `ban_id` mediumint(8) unsigned NOT NULL auto_increment, `ban_userid` mediumint(8) NOT NULL default '0', `ban_ip` varchar(8) NOT NULL default '', `ban_email` varchar(255) default NULL, PRIMARY KEY (`ban_id`), KEY `ban_ip_user_id` (`ban_ip`,`ban_userid`)) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=97 ;---- Dumping data for table `phpbb_banlist`--INSERT INTO `phpbb_banlist` VALUES(84, 0, '', '*@fromru.c... More About: Examples , Mysql , Create
Emoticons and Their Meanings
2008-03-19 16:54:00 A co-worker of mine emailed me this table of emoticons. I thought it was a fairly comprehensive list until I did a brief Internet search. The list was just a snippet, especially in the chat room space. I rarely engage in chat activities (maybe an occasional MSN chat with a family member), so I had no idea how many emoticons were out there. I discovered that I have been misusing a couple, which probably prompted the email and subsequently the table.Here are a few more reference links.Emoticons & Smiley PageList of EmoticonsGmail EmoticonsEmoticons and Smileys 101Wiki - List of Common Emoticons More About: Meanings
Emoticons and Their Meanings
2008-03-19 16:54:00 A co-worker of mine emailed me this table of emoticons. I thought it was a fairly comprehensive list until I did a brief Internet search. The list was just a snippet, especially in the chat room space. I rarely engage in chat activities (maybe an occasional MSN chat with a family member), so I had no idea how many emoticons were out there. I discovered that I have been misusing a couple, which probably prompted the email and subsequently the table.Here are a few more reference links.Emoticons & Smiley PageList of EmoticonsGmail EmoticonsEmoticons and Smileys 101Wiki - List of Common Emoticons More About: Meanings
SSH Secure Shell for Workstations
2008-03-16 14:29:00 A few years ago I took an Oracle database class at a university. I remember running SQL commands to perform a number of DBA tasks, such as creating databases, creating tables, creating procedures, altering tables, etc. via the command line. But in order to complete these tasks, we had to connect to the university's UNIX server via SSH. I remember using a nifty ssh client application. I found a link to its website while browsing my old coursework archive. At the time, I downloaded the "university use" copy, which was free, and it worked pretty well for the course.Per the vendor's website, you can still download their SSH Secure Shell 3.2 non-commercial source code and there is also a Windows Client executable. Both are free of charge from various anonymous ftp sites around the globe for purposes of EVALUATION, NON-COMMERCIAL USE, and UNIVERSITY USE as defined in their license agreement.Here is the link to the SSH Secure Shell for Workstations.Other suggestions are always welcome.
SSH Secure Shell for Workstations
2008-03-16 14:29:00 A few years ago I took an Oracle database class at a university. I remember running SQL commands to perform a number of DBA tasks, such as creating databases, creating tables, creating procedures, altering tables, etc. via the command line. But in order to complete these tasks, we had to connect to the university's UNIX server via SSH. I remember using a nifty ssh client application. I found a link to its website while browsing my old coursework archive. At the time, I downloaded the "university use" copy, which was free, and it worked pretty well for the course.Per the vendor's website, you can still download their SSH Secure Shell 3.2 non-commercial source code and there is also a Windows Client executable. Both are free of charge from various anonymous ftp sites around the globe for purposes of EVALUATION, NON-COMMERCIAL USE, and UNIVERSITY USE as defined in their license agreement.Here is the link to the SSH Secure Shell for Workstations.Other suggestions are always welcome.
Modify Information in a Nisplus Table
2008-03-09 13:11:00 The nistbladm command is used to modify information in a nisplus table. In this example, the passwd.org_dir table was modified. The login directory and shell was modified for the esoft user. Here is the syntax.Prior to modification# niscat passwd.org_dir | grep esoftesoft:SNVE9mJSZ9ub6:1005:10:Test Account:/export/home/esoft:/bin/sh:13947: :::::Modify the user's home directory# nistbladm -e home=/home/esoft '[name=esoft]'passwd.org_dir# niscat passwd.org_dir | grep esoftesoft:SNVE9mJSZ9ub6:1005:10:Test Account:/home/esoft:/bin/sh:13947::::::Mo dify the user's shell# nistbladm -e shell=/bin/zsh '[name=esoft]'passwd.org_dir# niscat passwd.org_dir | grep esoftesoft:SNVE9mJSZ9ub6:1005:10:Test Account:/home/esoft:/bin/zsh:13947:::::: More About: Information , Table
Modify Information in a Nisplus Table
2008-03-09 13:11:00 The nistbladm command is used to modify information in a nisplus table. In this example, the passwd.org_dir table was modified. The login directory and shell was modified for the esoft user. Here is the syntax.Prior to modification# niscat passwd.org_dir | grep esoftesoft:SNVE9mJSZ9ub6:1005:10:Test Account:/export/home/esoft:/bin/sh:13947: :::::Modify the user's home directory# nistbladm -e home=/home/esoft '[name=esoft]'passwd.org_dir# niscat passwd.org_dir | grep esoftesoft:SNVE9mJSZ9ub6:1005:10:Test Account:/home/esoft:/bin/sh:13947::::::Mo dify the user's shell# nistbladm -e shell=/bin/zsh '[name=esoft]'passwd.org_dir# niscat passwd.org_dir | grep esoftesoft:SNVE9mJSZ9ub6:1005:10:Test Account:/home/esoft:/bin/zsh:13947::::::# ##Add a user# nistbladm -a name=softhub uid=1000 gid=10 home=/home/softhub shell=/bin/zsh passwd.org_dir More About: Information , Table
Display the Structure of a Nisplus Table
2008-03-09 10:45:00 Building on the last post, I am using the niscat -o flag to display the structure of a common nisplus table. In the example below, the run shows the passwd table and its specific metadata/attribute information. Here is the syntax.# niscat -o passwd.org_dirObject Name : "passwd"Directory : "org_dir.esofthub.com."Owner : "esoft.esofthub.com."Group : "admin.esofthub.com."Access Rights : ----rmcdrmcdr---Time to Live : 12:0:0Creation Time : Sun Feb 24 18:22:47 2008Mod. Time : Sun Feb 24 18:22:47 2008Object Type : TABLETable Type : passwd_tblNumber of Columns : 8Character Separator : :Search Path :Columns : [0] Name : name Attributes : (SEARCHABLE, TEXTUAL DATA, CASE SENSITIVE) Access Rights : r---r---r---r--- [1] Name : passwd Attributes : (TEXTUAL DATA) Access Rights : ----rm--r---r--- [2] Name : uid ... More About: Display , Structure
Display the Structure of a Nisplus Table
2008-03-09 10:45:00 Building on the last post, I am using the niscat -o flag to display the structure of a common nisplus table. In the example below, the run shows the passwd table and its specific metadata/attribute information. Here is the syntax.# niscat -o passwd.org_dirObject Name : "passwd"Directory : "org_dir.esofthub.com."Owner : "esoft.esofthub.com."Group : "admin.esofthub.com."Access Rights : ----rmcdrmcdr---Time to Live : 12:0:0Creation Time : Sun Feb 24 18:22:47 2008Mod. Time : Sun Feb 24 18:22:47 2008Object Type : TABLETable Type : passwd_tblNumber of Columns : 8Character Separator : :Search Path :Columns : [0] Name : name Attributes : (SEARCHABLE, TEXTUAL DATA, CASE SENSITIVE) Access Rights : r---r---r---r--- [1] Name : passwd Attributes : (TEXTUAL DATA) Access Rights : ----rm--r---r--- [2] Name : uid ... More About: Display , Structure
List Objects and Tables in Nisplus
2008-03-09 09:50:00 I have had a few search queries (metadata) via MyBlogLog analytics from readers who were searching for commands to show Nisplus objects and tables. Frankly speaking, I neglected posting much about this legacy name service (earlier on) because I did not really think it was worthwhile. But apparently, there seems to be a decent number of organizations still using it. At any rate, here is an example run.Show the objects# nislsesofthub.com.:org_dirgroups_dirShow the tables# nisls org_dirorg_dir.esofthub.com.:passwdgroupa uto_masterauto_homebootparamscredethersho stsipnodesmail_aliasessendmailvarsnetmask snetgroupnetworksprotocolsrpcservicestime zoneclient_infoauth_attrexec_attrprof_att ruser_attraudit_userOther posts on nisplus More About: Tables , List , Objects
List Objects and Tables in Nisplus
2008-03-09 09:50:00 I have had a few search queries (metadata) via MyBlogLog analytics from readers who were searching for commands to show Nisplus objects and tables. Frankly speaking, I neglected posting much about this legacy name service (earlier on) because I did not really think it was worthwhile. But apparently, there seems to be a decent number of organizations still using it. At any rate, here is an example run.Show the objects# nislsesofthub.com.:org_dirgroups_dirShow the tables# nisls org_dirorg_dir.esofthub.com.:passwdgroupa uto_masterauto_homebootparamscredethersho stsipnodesmail_aliasessendmailvarsnetmask snetgroupnetworksprotocolsrpcservicestime zoneclient_infoauth_attrexec_attrprof_att ruser_attraudit_userOther posts on nisplus More About: Tables , List , Objects
Add DES Credential For a Client Workstation
2008-03-02 12:37:00 If you want to add a credential for a workstation, you will need to make an entry into the niscred.org_dir table on the server. This example demonstrates what is done on the server side and workstation side. There are third party tools out there to manage credentials, but personally I like using the command line. Here is what a colleague and I did to support a NIS+ server change.On ServerC shell# setenv PATH $PATH:/usr/lib/nisBourne or Korn Shell# PATH=$PATH:/usr/lib/nis; export PATH# nisclient -c -o -d esofthub.com esoft# nisaddcred -p unix.esoft@esofthub.com -P esoft.esofthub.com. des# nisgrpadm -a admin.esofthub.com esoft.esofthub.com.On Workstation C shell# setenv PATH $PATH:/usr/lib/nisBourne or Korn Shell# PATH=$PATH:/usr/lib/nis; export PATH# nisclient -i -d esofthub.com -h esoftsvr -a IPADDRESS More About: Credential , Client
Add DES Credential For a Client Workstation
2008-03-02 12:37:00 If you want to add a credential for a workstation, you will need to make an entry into the niscred.org_dir table on the server. This example demonstrates what is done on the server side and workstation side. There are third party tools out there to manage credentials, but personally I like using the command line. Here is what a colleague and I did to support a NIS+ server change.On ServerC shell# setenv PATH $PATH:/usr/lib/nisBourne or Korn Shell# PATH=$PATH:/usr/lib/nis; export PATH# nisclient -c -o -d esofthub.com esoft# nisaddcred -p unix.esoft@esofthub.com -P esoft.esofthub.com. des# nisgrpadm -a admin.esofthub.com esoft.esofthub.com.On Workstation C shell# setenv PATH $PATH:/usr/lib/nisBourne or Korn Shell# PATH=$PATH:/usr/lib/nis; export PATH# nisclient -i -d esofthub.com -h esoftsvr -a IPADDRESS More About: Credential , Client
Dump Sybase Database to File
2008-02-27 12:11:00 I had a reader ask me offline how to transfer a legacy database to another instance of a database management system (DBMS) on a separate server/workstation. The reader was trying to extract historical statistics via a test database (on a test server) without affecting the production database. I recommended dumping the entire database to a flat file and then writing (tar) the file to tape. I was uncertain if my response answered the reader's initial question but this is one way I dealt with a relatively small database (less than 50 megabytes) a few years ago. By the way, the sequence below assumes the receiving Sybase database was appropriately named and sized when it was created.Login into production DBMS1> use master2> go1> dump database yourdb to "/tmp/mydatabase.dat"2> go1> quit2> goArchive flat file to tape (assumes a tape drive is attached)# cd /tmp# tar cvfp /dev/rmt/0 mydatabase.datMove tape media to receiving server/workstation (assumes a tape drive is attached)# cd /tmp-... More About: File , Database
Dump Sybase Database to File
2008-02-27 12:11:00 I had a reader ask me offline how to transfer a legacy database to another instance of a database management system (DBMS) on a separate server/workstation. The reader was trying to extract historical statistics via a test database (on a test server) without affecting the production database. I recommended dumping the entire database to a flat file and then writing (tar) the file to tape. I was uncertain if my response answered the reader's initial question but this is one way I dealt with a relatively small database (less than 50 megabytes) a few years ago. By the way, the sequence below assumes the receiving Sybase database was appropriately named and sized when it was created.Login into production DBMS1> use master2> go1> dump database yourdb to "/tmp/mydatabase.dat"2> go1> quit2> goArchive flat file to tape (assumes a tape drive is attached)# cd /tmp# tar cvfp /dev/rmt/0 mydatabase.datMove tape media to receiving server/workstation (assumes a tape drive is attached)# cd /tmp-... More About: File , Database
Troubleshooting the "su: No shell" error
2008-02-24 10:54:00 The other day we had a problem with a system account. At first we did not notice the ?su: No shell? error on the console (headless server) but after a few reboots it was fairly evident. The message gave us enough feedback to determine the substitute user or su command was having a problem with a particular account. To ascertain which system account, we invoked a sequential step-through of the startup scripts.In the end, it appears that a third party application used to manage NIS+ had locked and changed the account?s shell to something unknown (by design) due to multiple login failures. The account was restored to its original shell.# su - esofthub -c "myscript"su: No shellView locked account# niscat passwd.org_dir | grep esofthubesofthub:*LK*:1005:10:esofthub test:/home/esofthub:/bin/sh.locked:13933: :::::Modify with third party applicationAfter the modification# su - esofthub -c "myscript"Visit Ucertify's challenge winners' blogs: Ax0N and armando For Files OnlyIf you are using t... More About: Shell , Error , Troubleshooting
Troubleshooting the "su: No shell" error
More articles from this author:2008-02-24 10:54:00 The other day we had a problem with a system account. At first we did not notice the ?su: No shell? error on the console (headless server) but after a few reboots it was fairly evident. The message gave us enough feedback to determine the substitute user or su command was having a problem with a particular account. To ascertain which system account, we invoked a sequential step-through of the startup scripts.In the end, it appears that a third party application used to manage NIS+ had locked and changed the account?s shell to something unknown (by design) due to multiple login failures. The account was restored to its original shell.# su - esofthub -c "myscript"su: No shellView locked account# niscat passwd.org_dir | grep esofthubesofthub:*LK*:1005:10:esofthub test:/home/esofthub:/bin/sh.locked:13933: :::::Modify with third party applicationAfter the modification# su - esofthub -c "myscript"Visit Ucertify's challenge winners' blogs: Ax0N and armando For Files OnlyIf you are using t... More About: Shell , Error , Troubleshooting 1, 2, 3, 4, 5, 6, 7 |



