Solution Corner

How to Map to a Microsoft Windows Share via Novell/Netware Login Script

By Skip Thompson

I recently had a K12 customer call with the following problem:

We bought some curriculum that had to install on a Windows server, and the user would need a mapped drive connection to it. So, I needed to map a drive letter to the Windows server during my user’s regular login script so that they did not need to log in twice.

We attempted several things without success including:
1. calling a DOS batch located on sys:public
2. putting the Net Use commands directly into the login script (#net use x: \\server\share)

Ultimately, we determined the following syntax would do what we wanted:
#COMMAND /C NET USE X: \\SERVER\SHARE

The actual command includes “password /user:domain\user” which passes the user and password along at mapping time. It’s a generic user on the windows share, but we wanted a password to stop runaway viruses from exploiting a read-write share with no password.

For more on syntax, visit ComputerHope.com.

How to find the most recently installed packages with RPM

By Chris Clark

Did the new package you just installed leave you less than excited and now you want to remove it? That is usually no big deal by itself, but what about all of those dependencies that got installed along with it? You probably want to uninstall them, too but can’t remember all of those arbitrary names. Plus, your graphical tool may not allow you to filter by install date, so what can you do?

One simple way is to use the command line tool, rpm. From a terminal, type:

rpm -qa - -last

The newest packages will be at the top. Since it will most likely be a long list, you may wish to pipe the output to less:

rpm -qa - -last | less

Type q to exit less. You could also pipe the output to grep to search for a specific day or date like this:

rpm -qa - -last | grep Jun

Of course, you can also use the “- -queryformat” option and impress your friends at parties:

rpm -qa - -queryformat ‘%{installtime} %{name}-%{version}-%{release} %{installtime:date}\n’

Basically, what the command is doing is querying the rpm database and with the “- -queryformat” option, you are specifying which “fields” in the database you want to see. The “%{installtime:date}” is a query option that tells the command that you want the date formated as a date string instead of the system time format. The “\n” means “new line” so that each package is listed on its own, individual line.

You could then pipe the whole thing to grep or use sort to find exactly the packages you want:

rpm -qa - -queryformat ‘%{installtime} %{name}-%{version}-%{release} %{installtime:date}\n’ | sort -n +3

Updating HPLIP in Suse Linux Enterprise Desktop 10 SP2

By Chris Clark

(Please be aware that this is not a supported solution)

To support newer HP printer models, you may need to install a newer version of HPLIP. However, after doing so, you may get the following error:

Unable to create print queue, please restart cups and try again

The cause, according to the HPLIP website ( http://hplipopensource.com/hplip-web/index.html ), are issues with cups 1.1.23, which is the version in SLED10SP2.
I downloaded and installed a newer version of cups (cups-1.2.12 - not the newest because I did not want to stray to far from dependency expectations) from here: http://www.cups.org/software.php
I no longer got the “Unable to create print queue, please restart cups and try again” error and was able to install my HP OfficeJet J6450 with the HP Device Management tool.
Additional note: If yast2 hangs while trying to “update driver database,” you may need to uninstall yast2-printer and reinstall it.