Subscribe: My SysAd Blog -- Unix
http://mysysad.com/feeds/posts/default
Added By: Feedage Forager Feedage Grade A rated
Language: English
Tags:
command  directory  file  install  issue  nfs  runtype  select runtype  select  server  symbol  ubuntu  unix  user  windows 
Rate this Feed
Rating: 1 starRate this feedRate this feedRate this feedRate this feed
Rate this feed 1 starRate this feed 2 starRate this feed 3 starRate this feed 4 starRate this feed 5 star

Comments (0)

Feed Details and Statistics Feed Statistics
Preview: My SysAd Blog -- Unix

My SysAd Blog -- Unix



This blog covers Unix system administration HOWTO tips for using inline for loops, find command, Unix scripting, configuration, SQL, various Unix-based tools, and command line interface syntax. The Unix OS supports tasks such as running hardware, device d



Updated: 2018-04-10T05:05:57.173-07:00

 



Make sure you typed the name correctly, and then try again error message

2014-06-07T07:29:45.389-07:00

Sometimes the Windows uninstall program leaves orphan files after a removal event. Here were the error messages and some background information.

http://www.shouldiremoveit.com/iWebar-91441-program.aspx
http://www.shouldiremoveit.com/Sense-102076-program.aspx

"Windows cannot find 'C:\users\myuser\AppData\Local\Temp\iwebar.exe"
"Make sure you typed the name correctly, and then try again."

"Windows cannot find 'C:\users\myuser\AppData\Local\Temp\sense.exe"
"Make sure you typed the name correctly, and then try again."

To deal with them, AutoRuns for Windows - http://technet.microsoft.com/en-us/sysinternals/bb963902.aspx(image)



XV for Ubuntu

2013-09-10T05:08:47.470-07:00

I just finished installing XV for Ubuntu. At first, I thought it would just be another package to install--i.e. apt-get install xv--It wasn't. The XV version (xv-3.10a) was a little old but it worked for my purpose.

Installation instructions can be found here - http://www.alexx.net/2012/07/xv-on-ubuntu.html(image)



Find Version of Currently Running Ubuntu

2013-09-07T03:51:16.761-07:00

Here is the syntax to determine which OS version of Ubuntu you are currently running on.
lsb_release -a

Here is the syntax to determine which Ubuntu kernel version you are currently running on.
uname -a
uname -r

(image)



Install mpstat and ptree programs

2013-09-07T03:51:51.258-07:00

Installed the mpstat and ptree programs.

# mpstat 2
The program 'mpstat' is currently not installed. You can install it by typing:
apt-get install sysstat
# apt-get install sysstat

# ptree
The program 'ptree' is currently not installed. You can install it by typing:
apt-get install adacontrol
# apt-get install adacontrol
(image)



Remove old Ubuntu kernel versions from /boot

2013-09-06T05:13:21.669-07:00

I was starting to run out of room in /boot. Had about 10MB of space left. I have been dabbling with Ubuntu for a couple months and I am still learning a lot of its nuances. Seems to be a stable OS and a lot of utilities are available for it.

Determine current kernel version (do not delete this one)
uname -r

List all the installed kernels on your system
dpkg --list | grep linux-image

Find kernels below your current one and remove each one with the following command. Again, don't remove your current kernel.
sudo apt-get purge linux-image-X.X.X.X-generic

Update grub2
sudo update-grub2

Reboot system
sudo reboot(image)



Remove Delta Search features from Mozilla Firefox

2013-09-01T01:24:52.490-07:00

I usually use Chrome to surf the Internet but it does not work well (button issue) with one of the Internet radio stations I wanted to listen to. The station (181.fm) worked well with Firefox though. However, I noticed a pesky problem with my "New tab" option. The "Delta Search" homepage was still there when I selected the "New tab" option, and I could not find an option to delete it via the browser. But I did find this page and my resolution was at the bottom of the page. Here's the URL for Firefox users, http://info.delta-search.com/uninstall/firefox

The page also has instruction links for Chrome and MSIE.(image)



magicJack's "No Audio Found" Error Message

2012-09-02T05:36:47.540-07:00


I had an issue with my magicJack phone. I could hear it ring and it had a dialtone but I could not dial out or receive calls. As a useful working indicator, I should see magicJack's stock symbol (CALL) on their desktop GUI. Instead, I observed the "No Audio Found" message.  Predictably, I rebooted my PC a couple times but no change. I decided to visit the PC's Device Manager.

I invoked the "Control Panel"=>"Hardware and Sound"=>"Device Manager"=>"Sound, video and game controllers" and then uninstalled the USB Internet Phone by TigerJet driver. Then I physically removed the magicJack device from the computer's USB port and then reattached it about 20-30 seconds later. Its driver was automatically found and re-installed. Now I could see magicJack's Stock Symbol: CALL on their GUI. At any rate, it works.

I never had a issue before but I think I had a conflict with another recently installed USB device.

Of course, you might get this error and it's something else. This is what worked for me.

By the way, the OS name is Windows 7.(image)



How to Exclude a Directory for TAR

2012-02-05T04:35:41.094-08:00

I am doing a few aesthetic upgrades, so naturally I want to backup some of my website files. However, I do not want everything, i.e. transient files such images. I tarred up the website's primary directory but excluded its images sub-directory.

Frankly speaking, I did not want to waste time and bandwidth downloading images. Here is the syntax to exclude a directory.

# tar cvfp mytarball.tar /mypath/Example.com_DIR --exclude=/mypath/Example.com_DIR/images

Tar everything in the current directory but exclude two files

# tar cvpf mytar.tar * --exclude=index.html --exclude=myimage.png

(image)



Restore MySQL Database via Command Line

2011-11-04T03:18:27.114-07:00

This is mostly a note to myself. It is not really a tip.

Restoring a mysql database from the command line.

[root@server]# ls -la
total 326940
drwx------ 3 user1 usergrp 4096 Oct 29 12:10 .
drwxr-xr-x 3 root root 4096 Nov 4 05:22 ..
-rw-r--r-- 1 user1 usergrp 1239136 Oct 29 12:10 mysql_db.sql

[root@server]# pwd
/backups/db/backup
[root@server]# mysql --user=mysql_user --password=somepasswd mysql_backup < mysql_db.sql

(image)



Sun StorageTek 6140 Cache

2011-10-29T08:36:23.793-07:00

We have a Sun StorageTek 6140 Array attached to a couple NAS heads. We share out its file systems from the NAS. But it seemed the NAS was creating bottlenecks and hanging NFS. As usual, it turned out to be something else.

We observed slowness during high or bursty I/O operations. Short story...It was the 6140's cache. Make sure your cache batteries are good to go and up to date. They have a 3 year shelf life. It will save you a lot of frustration in the long-run.
(image)



HTML Symbol Entities issue on Blogger

2011-06-17T19:41:06.679-07:00

I have received a few requests on how to deal with the HTML Symbol Entities issue on Blogger. There really isn't a problem because you can just click the box below for your post and your character(s) will display correctly.

ERROR
Your HTML cannot be accepted: Tag is broken: xxxxx



However, here are some good references for HTML Symbol Entities





(image)



Log an FTP Session with a Filter

2011-06-17T19:25:28.703-07:00

A couple colleagues and I were looking for an effective way to tersely log the activities of an FTP effort. All we wanted was the file name and throughput rate. If you are Ftping hundreds or thousands of files, the first one (below) could be quite verbose, especially if you have a security banner notice. Here are a couple ideas that we considered. We went with the alternative (a lot less text-based overhead).

#!/bin/sh
ftp -nv some_host /tmp/myftplog ‹‹EOFTP
user some_user some_password
cd /some_dir/some_dir1/some_dir2
binary
put some_image.jpg
EOFTP

and its log...

$ more /tmp/myftplog
Connected to some_host.
220 ProFTPD x.x.x Server ready.
331 Password required for some_user
230 User some_user logged in
250 CWD command successful
200 Type set to I
200 PORT command successful
150 Opening BINARY mode data connection for some_image.jpg
226 Transfer complete
ftp: 26753 bytes sent in 0.00Seconds 26753000.00Kbytes/sec.
221 Goodbye.

###ALTERNATIVE###

#!/bin/sh
ftp -n some_host /tmp/myftplog ‹‹EOFTP
user some_user some_password
cd /some_dir/some_dir1/some_dir2
binary
verbose
put some_image.jpg
EOFTP

and its log...

$ more /tmp/myftplog
Verbose mode On .
200 PORT command successful
150 Opening BINARY mode data connection for some_image.jpg
226 Transfer complete
ftp: 26753 bytes sent in 0.00Seconds 26753000.00Kbytes/sec.
221 Goodbye.

Display it...

$ tail -f /tmp/myftplog
(image)



The Importance of Library Level Integration in Open Source Environment

2011-03-19T01:24:06.638-07:00

By Jonathan FlackOpen Systems Engineer, Likewise SoftwareAs an Open Systems Engineer at Likewise Software I routinely encounter unique customer problems. Most of these problems require a clever solution which tends to be specific to the customer site.Earlier today, however, I got a query from an Ubuntu user that really made me consider how important library level integration by application developers can be when administering an open source environment. A lot of vendors out there provide free solutions without being open source, and a lot of these solutions solve one problem or another in your environment, but it's rare to come across a piece of software that really cleanly integrates into your deployed OS in a way that provides a multitude of very clean solutions to everyday problems.This user had a simple Linux application for which he needed to verify user authentication by simply passing the username and password to generate a pass/fail response. The application was neither pam/nsswitch integrated or GSS-enabled (built with GSSAPI support). The user's Linux environment was already authenticating to Active Directory using Likewise Open, our open source agent which allows user authentication against Microsoft's Active Directory. As a result, I know the user would have access to a fully functional Kerberos KDC. Anyone who has integrated Kerberos in a large environment before knows configuration can be a very painful experience. Likewise Open however, properly configures the client side kerberos and server side DNS automatically during domainjoin, so this little trip down nightmare alley is completely avoided. We are also assured that the configuration is correct.So the only thing left to do is leverage kinit to authenticate the user against AD's KDC.The specifics of the code in his application are not relevant, but you can see a simple example of this working using kinit from the command line:Positive Authentication -[root ~]# kinit joesmith@MYDOMAIN.COMPassword for joesmith@MYDOMAIN.COM: ************ [...]



The Khan Academy is Teaching the Online World

2010-10-01T17:19:37.458-07:00

Here is a great learning site to help brush up on your algebra, geometry, trigonometry, and calculus skills. You can also find courses for economics, finance, history and science. This growing site is called the Khan Academy. The instructor, Salman Khan, is helping current students and former students gain or regain their footing with these topics. He basically provides a 10 minute block of instruction (due to youtube’s time limit) on a given topic, which is short enough to keep your attention span. His site offers over 1800 different courses.

Salman gave up a successful career in finance to share his vast knowledge with the world for FREE. From what I can see, he’s a terrific math teacher.

The Khan Academy is a not-for-profit 501(c)(3) with the mission of providing a world-class education to anyone, anywhere.

Check out the Khan Academy and its amazing story.

And by the way, the Academy was recently selected by Google's project 10^100(image)



Use Redirect Symbol to Zero File

2010-07-04T07:05:12.257-07:00

I have mentioned this topic in an earlier post - zero'ing logfiles with cat /dev/null > logfile. But there is another easy way to zero a logfile in Bourne or Korn shell. It probably works in Bash and Zsh, too. I have to check. Here is an example below.

Note: I used the gts to represent the "greater than" or redirect symbol because blogger complained about using that particular character. Update: themadengineer reminded me on the use of "greater than" html syntax. Thanks.

Bourne Shell at the command prompt
# > mylogfile

or

Korn Shell at the command prompt
# > mylogfile

(image)



Run the Windows Explorer GUI

2010-06-29T00:39:36.625-07:00

Here are a few easy ways to invoke the Windows Explorer GUI, which displays certain parts of the directory/folder tree depending on given syntax. I also threw in a few other miscellaneous items.


1. Select Run
Then type "."
This action will invoke the C:\Documents and Settings\mysysad


2. Select Run
Then type ".."
This action will invoke a window that displays C:\Documents and Settings


3. Select Run
Then type "..."
This action will invoke a window that displays My Computer


Other misc Run exercises


Select Run
Type "explorer" - same as Type "My Documents"
Type "explorer c:"
Type "explorer desktop"
Type "explorer ."
Type "explorer .."


Select Run
Type "control panel"

Select Run
Type "recent"


Select Run
Type "calc"


Select Run
Type "notepad"


Select Run
Type "wordpad"


Select Run
Type "ping MySysAdDOTCOM"


Select Run
Type "c:" or "d:" or "a:"


Select Run
Type "freecell"
Type "sol"
Type "mshearts"
Type "spider"
Type "winmine"


Select Run
Type "mspaint"


Select Run
Type "nslookup"


Select Run
Type "cmd"(image)



Retrieve Information on LDAP User

2010-05-06T08:38:09.955-07:00

Here are a couple easy methods to get information from ldap for a particular user. Friend and I were talking about it yesterday because we had a typo in someone's login directory string (missing a character). He showed me a fancy one-liner but all I needed was a username, login directory, and its corresponding UID.

# ldaplist -l password username

# getent passwd username

# logins -x | grep username

The getent command is also handy to retrieve host and group information. It consults what databases are listed in the /etc/nsswitch.conf file.

# getent hosts hostname
# getent group 100
(image)



$HOME/.TTauthority not writable, auth entry not added

2010-04-27T05:42:02.575-07:00

After being absent from the work site for an extended period, I had a little problem with the dt session. I was being blocked a dt session (automatically logged me out--tried 3x). I observed Tooltalk/dt session errors on the screen.

But I also observed others logging into the same box without incident. Intuitively, I suspected something was wrong with my environment, so I logged in via a remote terminal. Once in the box, I reviewed the /var/adm/messages file and noticed /usr/dt/bin/ttsession errors were associated with my username. The messages file also contained this telling message - $HOME/.TTauthority not writable, auth entry not added.

Hmmm…ownership was not mine. I changed the ownership to yours truly and everything worked like a champ.

(image)



Microsoft Security Advisory --- F1 Key on Web

2010-03-03T03:37:33.568-08:00

A friend of mine from Japan emailed me this interesting article and thought I would share it.

Microsoft has issued a security advisory warning users NOT to press the F1 key when prompted by a website. This vulnerability could allow a hacker to hijack a computer. This vulnerability affects all versions of Internet Explorer on computers running Windows 2000 and Windows XP operating systems. More information can be found at


DO NOT press the F1 key if prompted by a website. Doing so could allow a hacker to hijack your computer!
(image)



Import and Enable the NFS Service

2010-02-27T22:16:56.988-08:00

Last week we had a little issue with mounting directories from a new Solaris 10 server. It was noted the nfs service was not running on it. We had to import and then enable the service. After that, we were able to mount the required directories from the server.


# svcs -a | grep nfs
# cd /var/svc/manifest/network
# svccfg -v import nfs/server.xml
# svcadm enable nfs/server

or

# svccfg -v import /var/svc/manifest/network/nfs/server.xml
# svcadm enable nfs/server

If you want to disable and delete a service, see below.

# svcadm disable network/nfs/server
# svccfg delete network/nfs/server(image)



Issues With an Orphaned .attribute^ File

2009-11-24T02:38:51.262-08:00

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.(image)



ftpconfig - Setup Anonymous FTP

2009-11-13T17:18:12.187-08:00

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(image)



No Space Left on Device!

2009-09-18T08:41:45.054-07:00

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.(image)



Troubleshooting Domain Issues with My SysAd Blog - Again

2009-07-10T09:21:45.198-07:00

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...
(image)



142857 is an Interesting Number

2009-07-27T06:27:06.316-07:00

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?(image)