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)
Unable to create print queue, please restart cups and try again