Monday, November 23, 2009

Issues With an Orphaned .attribute^ File

We had intriguing problem related to a Unix-based directory. This directory was mapped to Windows via Citrix.

On the Windows side, the initial thought was that the folder was simply "hidden" via the attributes, which would be normal. However, the attributes for the folder didn't show the hidden option selected.

Recently, we performed an account migration activity on the Unix side. The culprit turn out to be an orphaned .attribute^ file on the Unix side. Apparently, this file's username and group was deleted prior to migration, and its state unexpectedly caused the directory's contents to be invisible to Windows-based viewers.

At any rate, we finally noticed the file with the ls -al command. The .attribute^ file was removed from the Unix side and viewing was back to normal on the Windows side.

Friday, October 23, 2009

ftpconfig - Setup Anonymous FTP

To setup an anonymous FTP account, you might consider using the ftpconfig script. It seems to be a lot easier to setup an anon FTP account with Solaris 10 than it was for Solaris 8. The anon users log in and then they are given restricted access to a mini-root filesystem.

Here is the syntax.

# ftpconfig someftpdir
or
# ftpconfig -d someftpdir

If you have problems, you may have to check files in the /etc/ftpd directory. Hint: check the ftpaccess file

Friday, September 18, 2009

No Space Left on Device!

About two weeks ago, my colleague and I had an issue with the /var partition on a seldom used Sun Blade 2500 workstation. Frankly speaking, I thought a simple fsck would suffice while in single user mode. Not quite. Anyway, we executed fsck on the partition and it "fixed" whatever errors reported. And while in single user mode, we wrote test files to the partition without incident. However, once we booted to init 3 run level, we still could not write to the /var partition, not even as root. That was a bit strange because df -k reported only 20% of the partition was used. hmmm...inode problem?? Then we looked through the logs and noticed a message about not having enough space on the device – in short, we ran out of inodes. Almost immediately, we suspected a problem with mail. We checked the mqueue directory and it contained almost a 1,000,000 small extraneous/useless messages from cron. We deleted most of them (after a few hours) and it resolved the issue. And yes, we got a handle on the cron that was generating those messages.

Friday, July 10, 2009

Troubleshooting Domain Issues with My SysAd Blog - Again

Late last night (KST), I was reviewing my free MyBlogLog stats and noticed 8 visitors had stopped by the blog. Usually, by that time, mysysad would have had several hundred visits. I surfed over to the domain and verified it was down (this blog is hosted on the blogger.com platform and it is pointing to a custom domain). However, the blog was working with the old address, http://esofthub.blogspot.com

I pinged the old IP address - no answer. Then I pinged ghs.google.com, and it responded with a different IP address. I used that new address to update my A-Records with my domain registrar -- yahoo.

After 20-30 minutes of propagation, the mysysad.com domain was back online.

By the way, I just pinged the old address twice...no response. Update: 7 hours later - pinged again - no answer

Here is another post I wrote a few months ago about a similar issue...

Thursday, June 18, 2009

142857 is an Interesting Number

A couple of days ago a colleague sent me this interesting number, 142857, via email. I performed a Google search on the number and I was surprised to see so many returns - 190,000. It even has its own wiki page. For additional information, here is the wiki page for this cyclic number - 142857.

Below is the email.

Subject: Interesting Numbers

Roy,

I want to let you know a weird number which is 142857.

Why?

142857 X 1 = 142857
142857 X 2 = 285714
142857 X 3 = 428571
142857 X 4 = 571428
142857 X 5 = 714285
142857 X 6 = 857142

See, the answers show all same numbers with different position.

142857 X 7 = 999999

142 + 857 = 999
14 + 28 + 57 = 99

142857 X 142857 = 20408122449
20408 + 122449 = 142857

Interesting, huh?

Saturday, May 30, 2009

Pipe Symbols are Missing from Some Posts

You might have already noticed some of my theme formatting attempts appeared to have removed essential characters - in particular, the pipe symbols. I will try to go back and fix them when I get some time. I just want you to be aware of the inconvenience. Thanks Mr. Mendoza.

Gilbert Mendoza said...
Hey there. Just as an FYI, I believe your theme formatting has removed essential characters from some of your posts. For example, none of the pipe symbols separating each of the stringed commands are showing.
4/25/09 1:15 PM

esofthub said...
You're right Gilbert Mendoza. I just check a few posts and the "|" are missing. I guess changing between themes deleted them.
4/25/09 3:15 PM

Field 'user_website' doesn't have a default value

I received a few complaints about not being able to register an account on my phpbb forum. To confirm, I tried creating a test account.

Here were the results:

General Error
SQL ERROR [ mysql4 ]

Field 'user_website' doesn't have a default value [1364]

An SQL error occurred while fetching this page. Please contact the Board Administrator if this problem persists.

Please notify the board administrator or webmaster: some one @gmail.com

In my case, here was the fix. Of course, make sure you backup your database.


I ran the commands via phpmyadmin. It works fine now.

Saturday, April 25, 2009

Determine Java Runtime Environment Version

A few days ago I was asked for a quick and easy way to determine what java runtime environment version was installed via the Unix command line. The requester was trying to determine possible compatibility issues for some recently purchased applications.  

Bear in mind that you may have multiple JRE environments installed on your box so consider the PATH value -- meaning you might have to specify an absolute path. e.g. /usr/some_java_version/bin/java

Here is the Unix one-liner syntax using default path

% java -version
java version "1.x.x_xx)
...

By the way, it is the same syntax for Windows.

C:\Users\mysysad> java -version
java version "1.x.0_xx"
Java(TM) SE Runtime Environment (build 1.x.0_xx-xxx)
Java HotSpot(TM) Client VM (build xx.3-bxx, mixed mode, sharing)

Friday, April 17, 2009

Access a Tape Drive Device From a non-global Zone

A couple days ago, I had a friend who wanted to know how to access a tape device from his Solaris 10 non-global zone.

Here is an example on how to add a device to an existing non-global zone. By the way, the commands below are ran from the global zone, and you will have to reboot the non-global zone.

# zoneadm list
mysysad-global

# zonecfg -z sysad
zonecfg:sysad> add device
zonecfg:sysad:device> set match=/dev/rmt/0n
zonecfg:sysad:device> end
zonecfg:sysad> verify
zonecfg:sysad> commit
zonecfg:sysad> exit

# zoneadm -z sysad reboot

After the reboot, you should be able to access the tape drive from the non-global zone.

Tuesday, March 24, 2009

Disable On-screen Keyboard on Startup

I was playing around with a few of Vista's settings on my laptop. Unfortunately, one of those settings was the “On-Screen Keyboard.” I had the utility set to automatically start up each time I logged on; however, I did not want or need that convenience. After a few more logins, it got really annoying. It was time to unset the setting, but it took me awhile to rediscover the setting and uncheck it.

At any rate, here is the path to the setting via the control panel.

Control Panel=>Ease of Access Center=>Use the computer without a mouse or
keyboard=>On-screen keyboard (uncheck it and then Save)

Wednesday, February 04, 2009

Create Tarballs Greater Than 2GB

I was tarring a Unix-based application today when I encountered tar's 2GB file size limit. Frankly speaking, I was a bit surprised the application was greater than 2GB because it was only few hundred megabytes a few years ago. Anyway, to get around this annoying limitation, I used the -E option, but it did not work. I realized that I was using a non-standard tar binary because of redefined paths -- per site policy. I specified the absolute path for the OS-based tar command and the tar activity worked fine.

Here is an example.

# /usr/bin/tar -cvfpE GreaterThan2GB.tar /opt/MYAPP

Thursday, January 29, 2009

Identify Zone Processes via Global Zone

I had a colleague of mine ask a question about how to identify processes that belong to a particular zone via the global zone because the global zone “sees” everything. Recently, I attended a class and it covered the "deltas" between Solaris 10 and Solaris 8 and this question surfaced there, too. 

The quick answer is to use the "-Z" option, which is the uppercase form.

Here is an example from the global zone.

# /usr/bin/ps -efZ