Iprint
/etc/init.d/novell-ipsmd stop

/etc/init.d/novell-ipsmd start
rcnovell-ipsmd stop
rcnovell-ipsmd start
rcnovell-ipsmd restart
killall ipsmd

Determine version of OES/SLES
cat /etc/novell-release

Operations using iPrintMan
Create iPrint Driver Store
iprntman ids "[ids]" -c
iprntman ids "cn=myIDS,ou=myContainer,o=myOrganization" -c

Create Print Manager
iprntman psm "[psm]" -c --use-ids "[driverstore]"
iprntman psm "cn=myPSM,ou=myContainer,o=myOrganization" -c --use-ids "cn=myDriverStore,ou=myContainer,o=myOrganization"

Create a Printer
iprntman printer [printer] -c --container [context] --gateway-load-string "iprintgw PORT=LPR HOSTADDRESS=[ip_address_of_printer] PRINTERNAME=PASSTHROUGH"
iprntman printer p1 -c --container ou=print,o=novell --gateway-load-string "iprintgw PORT=LPR HOSTADDRESS=137.65.215.146 PRINTERNAME=PASSTHROUGH"

Associate Windows XP, Windows 2000, and Linux drivers to an existing printer
iprntman printer p1 -m --driver-winxp "HP LaserJet 4200 PCL 5e"
iprntman printer p1 -m --driver-win2k "HP LaserJet 3200 Series PCL 5e"
iprntman printer p1 -m --driver-linux "HP LaserJet 8000 Series"
iprntman printer p1 -m --driver-win764 "Xerox WorkCentre 7855" -u cn=admin,o=iPrintAppliance
iprntman printer p1 -m --driver-win1064 "Xerox Phaser 6360 Series Class Driver" -u cn=admin,o=iPrintAppliance
---> note: driver-win1064 updates the Win8/10 driver association.  driver-win864 updates the same thing.
Manage Printer
iprntman printer [paname] –stop
iprntman printer [paname] –start
if spaces in pa name, then they PA name must be in quotes.
revert to backup database copy:
cp -p /var/opt/novell/iprint/[PSM].[OU].[O].psm/psmdb.dat /somelocation
cp -p /var/opt/novell/iprint/[PSM].[OU].[O].psm/psmdsav.dat psmdb.dat

Viewing iPrint Processes
ps -elL | grep ipsmd (view threads held by ipsmd)
ps -eaf | grep ipsmd (view running ipsmd processes)
kill -9 [pid]

Location of Stuff
/var/opt/novell/iprint/[PSM].[OU].[O].psm/psmdb.dat

ipsmd and idsd log files:
/var/opt/novell/log/iprint/

Cluster log files for service startups:
/var/opt/novell/log/

Cluster load script:
/var/opt/novell/ncs/SOMENAME_SERVER.load

PSM and IDSD configuration files:
/etc/opt/novell/iprint/conf/print_manager_name_ipsmd.conf and idsd.conf

iPrint/Apache configurations are loaded with these symlinks. *.conf files under httpd are loaded with Apache.
/etc/opt/novell/httpd/conf.d/iprint_g.conf --> Opens port 631
/etc/opt/novell/httpd/sslconf.d/iprint_ssl.conf --> LDAP Configuration

The actual iPrint Apache conf files reside in:
/etc/opt/novell/iprint/httpd/conf/

iprint.ini, iprint clients, Windows iprntman installation:
/var/opt/novell/iprint/htdocs

Cached drivers at the PSM:
/var/opt/novell/iprint/mod_ipp/drivers/

RESDIR location:
/var/opt/novell/iprint/resdir/

Location of Binaries:
/opt/novell/iprint/bin

Location of pid files:
/var/opt/novell/run/iprint

If ipsmd symlink is missing:
cd /etc/opt/novell/iprint/conf
ln -s /etc/opt/novell/iprint/conf/manager.ou.o.ipsmd.conf ipsmd.conf

To recreate Printer Agents using a CSV (creation mode, not associate)
1. Delete all of the DS Printer Agent objects.
2. Create a new Print Manager (if needed)
3. Run the new Print Manager
4. Prepare the CSV file
- Remove all Driver Associations (bug in iprntman: it won't associate drivers)
- Check for invalid characters in CSV file (use Beyond Compare: it's better at detecting hidden characters)
5. cd to the directory where you copied the CSV file.
6. Run this command:
iprntman printer --csv-import ./[NameOfCSVfile.csv]
7. Authenticate with your eDir username and password

Generate XML without executing migration
Example:
/opt/novell/bin/iprintmig -v -v -v -v -s 172.16.30.28 -d 172.16.30.61 -i 172.16.30.61 -D cn=PPS-PRINT-MANAGER,ou=SERVICES,o=PPS -u cn=administrator,o=pps -U cn=administrator,o=pps -I cn=PPS-PRINT-DRIVERS,ou=SERVICES,o=PPS -a --noIni --nodrivers --overwrite-profiles -N --progress-interval 2 --port 636 --ssl –nogo

Syntax:
/opt/novell/bin/iprintmig -v -v -v -v -s <NetWareIP> -d <LinuxIP> -i <IDSserverIP> -D <PSMDN> -u <SourceAdminFDN> -U <DestinationAdminFDN> -I <IDS-FDN> -a --nodrivers -N --progress-interval 2 --port 636 --ssl –nogo

How to install the latest iPrint Info plugin:
Check to see which iPrint plugin is installed.
rpm -qa |grep supportutils-plugin-iprint
Check to see which iPrint plugin is available in the registered channels:
zypper search -s supportutils-plugin-iprint
Install the latest iPrint plugin:
zypper in supportutils-plugin-iprint


PSMRebuild
Running this script will:
- make a backup of the Print Manager XML in the /tmp directory
- make a backup of the psmdb.dat in the /var/opt/novell/iprint/<print manager name and context>.psm directory.
- blank the Print Manager database
- rebuild the Print Manager database to contain all the original printer configuration.
Note: You will be prompted to provide the admin password. Printing will be down for a few minutes while this script runs.

Paste the following string of commands into a terminal session while logged in as root.
wget -P /tmp ftp://ftp.novell.com/outgoing/PSMRebuild-1.6.sh;chmod +x /tmp/PSMRebuild-1.6.sh;/tmp/PSMRebuild-1.6.sh

If you don't like the results of the script, you can easily go back by:
- Find name of the backup .dat file within the /var/opt/novell/iprint/<print manager name and context>.psm directory
- Run these commands:
rcnovell-ipsmd stop
/opt/novell/iprint/bin/ipsmd -r <name of the backup .dat file>
Note: do not provide the path to the .dat file. Just the name.

Web Stuff
rcapache2 restart
log files in /var/log/apache2
rcnovell-tomcat4 restart
/etc/apache2/httpd.conf

Enable Apache debug:
/etc/sysconfig/apache2
APACHE_LOGLEVEL="debug"

To enable extra Apache information which can be viewed through a web page:
Comment out the location parameters within the /etc/apache2/mod_status.conf
<Location "/server-status">
SetHandler server-status
Require all granted
</Location>

Change the following in /etc/sysconfig/apache2
APACHE_EXTENDED_STATUS="on" {this is off by default}

Add mod_status module to the following list:
APACHE_MODULES="actions alias auth_basic authn_file authz_host authz_groupfile authz_core authz_user autoindex cgi dir env expires include log_config mime negotiation setenvif ssl socache_shmcb userdir reqtimeout proxy proxy_ajp proxy_http rewrite authn_core php5 mod_status"

restart apache2

Enable iprntman logging:
export IPRINTMAN_TRACEFILE=/tmp/iprntman.log

Determine which service is

Is LDAP running?
netstat -atp | grep ldaps

Which process is listening on port 631?
netstat -atnp | grep 631

Telnet test (without Telnet)
Syntax:
curl -v telnet://<IP of Printer>:515
Example:
curl -v telnet://137.65.47.4:515

Determine which service is reply to apache requests:
http://ip/asdf
Check the apache error_log to see if /srv/www/htdocs/ is replying

Determine how many apache threads are being used:
pgrep httpd | wc -l

Is the LDAP server's cert signed by the CA's key?
OES 1:
echo -n | openssl s_client -connect localhost:636 -CAfile /etc/opt/novell/SSCert.pem -verify 255
echo -n | SSL_CERT=/no_dir openssl s_client -connect localhost:636 -CAfile /etc/opt/novell/SSCert.pem -verify 255

OES 2:
echo -n | openssl s_client -connect localhost:636 -CAfile /etc/opt/novell/certs/SSCert.pem -verify 255
echo -n | SSL_CERT=/no_dir openssl s_client -connect localhost:636 -CAfile /etc/opt/novell/certs/SSCert.pem -verify 255

Capture LDAP trace of psmstatus login or other LDAP processes
1) Open a putty or terminal session to the iPrint server
2) Type:
ldapconfig set "LDAP Screen Level=all" - provide FDN and password for admin
ndstrace
set ndstrace=nodebug
ndstrace time tags ldap
ndstrace screen on
ndstrace file on
set ndstrace=*r (to clear the trace file)
3) Duplicate the issue and one duplicated type:
ndstrace file off
exit
4) Send the /var/opt/novell/eDirectory/log/ndstrace.log and let me know the username that attempted the login.

If the iPrint plug-in doesn't show as an available plug-in module:
/var/opt/novell/iManager/nps/portal/modules/iPrintX/install/iPrint.xml
rcnovell-tomcat5 restart

iManager iPrint certificate stored in Tomcat:
/var/opt/novell/tomcat5/webapps/nps/portal/modules/iPrintX/certstore/cn=admin,o=novell,[DNSorIP].hostnames

To auto create the SSL CertificateDNS:
ndsconfig upgrade -j

Certificate Recreation Script:
wget -P /tmp http://trevman.com/utils/certificate-creation-4.1.sh

Who issued SSCert.pem (eDir CA, YaST, or someone else?) should be eDir CA:
openssl x509 -in /etc/opt/novell/SSCert.pem -noout -text

Installing updated RPM:
rpm -Uvh novell-iprint-server.i586.rpm

Test validity certificate file:
cd /etc/opt/novell/certs/
certtool --certificate-info --infile SSCert.pem | more

Do we know the pass phrase?
openssl rsa -noout -modulus -in vaserver.pem
DNS name used with PEM file?
openssl x509 -in vaserver.pem -noout -issuer -issuer_hash
Subject Alternative Name has both DNS and IP?
openssl x509 -in vaserver.pem -noout -text
CSR valid? Does it contain both DNS and IP as SAN?
openssl req -text -noout -verify -in CSR.csr
Look at md5 to see if CRT, KEY, and CSR belong to same batch:
openssl x509 -noout -modulus -in certificate.crt | openssl md5
openssl rsa -noout -modulus -in privateKey.key | openssl md5
openssl req -noout -modulus -in CSR.csr | openssl md5

Add proxy exceptions:
vi /etc/sysconfig/proxy
NO_PROXY="127.0.0.1, localhost,...."

Download file from web:
wget http://www.novell.com/communities/files/certificate-creation-1.1.tgz

DSRepair:
ndsrepair -U

Troubleshooting Apache Vs iPrint:

CONFIGURE APACHE TO NOT LOAD IPRINT
cd /etc/opt/novell/httpd/conf.d
mv iprint_g.conf iprint_g.bakconf
cd /etc/opt/novell/httpd/sslconf.d
mv iprint_ssl.conf iprint_ssl.bakconf
rcapache2 start

CONFIGURE APACHE BACK TO PREVIOUS CONFIGURATION (to load iPrint):
cd /etc/opt/novell/httpd/conf.d
mv iprint_g.bakconf iprint_g.conf
cd /etc/opt/novell/httpd/sslconf.d
mv iprint_ssl.bakconf iprint_ssl.conf
rcapache2 restart

Alternative to force unrestricted access:
/var/opt/novell/iManager/nps/WEB-INF/configiman.properties
admin.novell=eDirectory

CUPS

restart cups:
rccups restart (status, stop, start)

To list versions of CUPS, Foomatic, Ghostscript, and Hplip:
rpm -qa | egrep '^cups|^foomatic|^ghostscript|^hplip'

List the Device URI's for all CUPS printers:
lpstat -v

Which process is listening on port 631?
lsof -i TCP:631

Associate PPD to installed CUPS printer
lpadmin -P [Name] -m name.ppd

To create a CUPS printer:
lpadmin -p [printer_name] -v [Device_URI] -P /usr/share/cups/model/HP/[ppd] -E
lpadmin -p colorlj -v socket://10.0.1.19:9100/ -P /usr/share/cups/model/HP/Color_LaserJet_4600-Postscript.ppd.gz -E

To create a CUPS printer without an associated PPD:
lpadmin -p colorlj -v socket://10.0.1.19:9100/ -E

To determine the version of CUPS:
rpm -qa | grep cups

Determine what USB ports are detected by the OS:
lsusb

To add a user to the LP admin group:
lppasswd -a [linux_user_account] -g sys

Send a print job:
lp -d colorlj /directory/file

PPDs stored on SuSE:
/usr/share/cups/model

Error Log:
/var/log/cups/error_log

CUPS configuration file:
/etc/cups/cupsd.conf

To view a CUPS printer's queue
lpq -P <printername>

To test a CUPS ppd:
cupstestppd or http://www.cups.org/testppd.php
http://partners.adobe.com/public/developer/en/ps/5003.PPD_Spec_v4.3.pdf

Determine version of SuSE
cat /etc/SuSE-release

Set up VNC
vncserver
give it a password. The listening port is 5801

NDS eDirectory Commands
ndsstat (determine version of eDir)
ndsrepair -T (check TimeSync)
ndsrepair -P (view paritition information... from here, hit a number for a partition, then perform various repairs)

Restart eDir and LDAP
---- cd /etc/init.d
---- ./ndsd restart

General Linux

Capturing TCPDUMPs
tcpdump -i lo -s 0 -w /directory/filename.cap (loopback capturing)
tcpdump -s 0 -w /directory/filename.cap (primary NIC capturing)
tcpdump -i any -s 0 -w /directory/filename.cap (All interface capturing – loopback, primary NIC, secondary NIC, etc)
tcpdump -s 0 -W 30 -C 10 -w /directory/filename.cap (-W = The number of files to rotate / -C = MB each file will not exceed)
tcpdump -n port 9100 -s 0 -W 30 -C 10 -w /tmp/CUPS-ConnectionTimeOut.cap (capture rotating data, only from a specific port number)
tcpdump -n host 10.10.2.2 -s 0 -W 30 -C 10 -w /tmp/CUPS-ConnectionTimeOut.cap (capture rotating data, only from a specific IP address)
tcpdump -n port 631 -s 0 -w /tmp/ClientVersion.cap

a. Log into a terminal session with the root user.
b. Paste the following command into a terminal session.
tcpdump -n host 10.23.53.15 -W 10 -C 10 -w /tmp/CUPSnotPrinting.cap
Note:
-n = replace the example IP address with IP address of the printer that can duplicate the problem.
-W = The number of files to rotate
-C = MB each file will not exceed
c. Wait for the problem to happen.
d. As soon as the problem happens, do a ctrl + c within the terminal session to stop the trace
It is important to stop the trace quickly after the problem was noticed so the tcpdump capture doesn't overwrite the problem.
e. Copy off the files. Zip them up. Upload the ZIP file to ftp://ftp.novell.com/incoming
f. Send me an email with:
- the name of the uploaded ZIP file
- the approximate time the print job failed.

Transfer Files using FTS:
sftp -P 2222 userfromSalesforce@ftp-pro.houston.softwaregrp.com

Find a filename
find / -iname [filename]

Turn less into tail
SHIFT + F

Upload to ftp outgoing site using Linux:
Install lftp, then run this command:
lftp -d -e 'set ssl:ca-file /tmp/DigiCertCA.pem;set ftp:ssl-force true; set ssl:verify-certificate true' -u kwbradford ftp-internal.provo.novell.com

Rename a file (or symlink)
mv originalname newname

List files chronologically:
ls -lrth

List files alphabetically:
ls -lh

Decrease NIC performance (throttle Network Card)
tc qdisc add dev eth0 root netem delay 1000ms

FTP file from linux to ftp.novell.com/incoming
ftp
open ftp.novell.com
anonymous
email@email.com
cd incoming
lcd /[local_directory]/[local_directory]
put [filename]
quit

Here is an example:

ftp
open ftp.novell.com
anonymous
email@email.com
cd incoming
lcd /tmp/mytcpdumps
put TCPDumpOfFailure
quit

Curl command to upload file to FTP Incoming:
Syntax:
curl -T /<path>/<to>/<file> ftp://ftp.novell.com/incoming/
Example:
curl -T /etc/hosts ftp://ftp.novell.com/incoming/

Install FTP to an Appliance server:
wget -P /tmp http://fr2.rpmfind.net/linux/opensuse/tumbleweed/repo/oss/x86_64/ftp-0.17-694.18.x86_64.rpm
rpm -Uvh /tmp/ftp-0.17-694.18.x86_64.rpm

Mail a file from command line
mail -s “SR # 10643......” -a padbtxt.xml kwbradford@novell.com

Decompress a tar.gz file:
tar -xzvf [filename].tar.gz

tar gz examples (compress directory AND compress files start with something*)
tar -zcvf archive-name.tar.gz directory-name
tar -zcvf archive-name.tar.gz filenam*

Extract Tar
tar -xvf yourfile.tar
tar -C /myfolder -xvf yourfile.tar

tar a directory:
tar cvf [tarname].tar [directory]

chmod -R 777 [directory]/
1=x
2=w
3=wx
4=r
5=rx
6=rw
7=rwx
chown [username].[group] * ---> an example group = users

Set the sticky bit permission:
chmod 4750 /opt/novell/iprint/bin/papercut
chmod 4750 /opt/novell/iprint/bin/iprintgw

Instructions to update to OES SP1 using RUG:
Activation code:
rug act -s 1 2B95AC7D44EB0A kwbradford@novell.com

Mount an ISO
mount -o loop [fileName].iso /mnt

Dump last 100 lines of a file to a new file:
tail -500 /whatever/log/file/file.log > /tmp/whateverNewLogYouWant.log

Dump line 1000 through line 1100 to a new file:
awk 'NR >= 1000 && NR <= 1100' /var/opt/novell/tomcat-filr/logs/appserver.log > /tmp/appserver-Portion.log

fstab mount example:
thor.print.lab.novell.com:/share/downloads /mnt/tools nfs defaults,noauto,ro,rsize=8192,wsize=8192,intr,soft 0 0

vi Commands

vi find string
/[whateverString]
n --> find next occurrence of that string
N --> find previous occurrence of that string
gg --> cursor goes to top of file

To replace a string with blank: (example: &amp)
:%s/&amp//g

To replace a string with another string: (example: billy for bob)
:%s/billy/bob/g

To delete a line starting with a string:
(example: <role>)
:g/<role>/d

(example: <acl>)
:g/<acl>/d

(example: </acl>) (note: need the \ 'escape' key)
:g/<\/acl>/d

Search backwards:
?

Remove ^M characters
:%s/^M//g
To enter ^M, type CTRL-V, then CTRL-M. That is, hold down the CTRL key then press V and M in succession.

Search for lines which start with <dn>, skip the CN entry, and write the new string.
%s:\(<dn>[^,]*\),.*:\1,O=novell123</dn>:g

Count number of printer agents within XML (minus the Print Manager)
grep "\<dn\>" padbtxt.xml | wc -l

Search for text string across many files:
grep “whatevertext” *.conf
or
find /<path> -type f | xargs grep -i "Look for Me"

DOS Equivalent
cd to the directory to start the search
Syntax:
findstr /S /I /M "WhateverText" *.*

For Faster results:
findstr /S /I /M "WhateverText" *.txt

The findstr command will return file names for every file which has any of the words in the quoted phrase. To return file names which have only the exact phrase, use PowerShell:
Get-ChildItem -Recurse -Filter "RetainServer*.log" | Select-String -Pattern "Exact phrase you want searched" -SimpleMatch | Select-Object -Property Path -Unique
Note: The above command can take a few minutes.
Note: Both the items in quotes need to be adjusted according to your search needs.


Delete Print Jobs over 3 days old:
find /vastorage/iprint/var/opt/novell/iprint/print_manager.iPrintAppliance.psm -name "*.1" -type f -mtime +3 -delete
find /vastorage/iprint/var/opt/novell/iprint/printmobile/jobs -name "*.*" -type f -mtime +3 -delete

Find 10 largest directories and files
du -aSh /var | sort -rh | head -n 15

Find largest files in a directory: (uses less memory to calculate than the above command)
find /var -printf '%s %p\n' | sort -nr | head -15 | while read -r size file; do echo "$(numfmt --to=iec-i --suffix=B --format='%.1f' "$size") $file"; done

rsync command to preserve permissions and information (-i) on what changes:
rsync -ravPi source destination

View the disk space used by a directory and its subdirectories
du -h

sed command to delete lines which contain text of 'special'
sed -i '/special/d' myfile.txt

sed command to find/replace text in a file
sed -i 's/old-text/new-text/g' file.txt
sed -i 's/APACHE_LOGLEVEL="warn"/APACHE_LOGLEVEL="debug"/g' /etc/sysconfig/apache2
sed -i 's/server_log_level=warning/server_log_level=info/g' /etc/opt/novell/iprint/conf/iprintconf.properties
sed -i 's/client_delete_not_found_printers=false/client_delete_not_found_printers=true/g' /etc/opt/novell/iprint/conf/iprintconf.properties
sed -i 's/client_delete_not_found_printers=true/client_delete_not_found_printers=false/g' /etc/opt/novell/iprint/conf/iprintconf.properties
sed -i 's/<accountingloadstring>papercut/<accountingloadstring>/g' /tmp/padbtxt.xml
sed -i 's/=WARNING/=INFO/g' /var/opt/novell/iprint-tomcat/webapps/iprint/WEB-INF/classes/logging.properties;sed -i 's/=WARNING/=INFO/g' /etc/opt/novell/iprintmobile/conf_local/config_logging.properties

Command to see how much disk space a directory is taking
du -sch var
du -sch usr

Check available disk space
df -h

Clear Memory Cache & SWAP file
sudo sync;echo 3 > /proc/sys/vm/drop_caches && /sbin/swapoff -a && /sbin/swapon -a

List process in order of most memory taken:
top -b -o +%MEM | head -n 20
top -b -o +%MEM | head -n 20 >> /tmp/Memory_Sorted_by_Process_Name.txt

Test Disk Read speed.
cd to the disk (partition) you want to test
Create a directory called 'speed'
cd to the newly created speed directory
Ensure you have at least 10GB free space on this partition
Run this command:
dd if=/dev/zero of=1gb.img bs=1G count=1 oflag=dsync
→ Notes:
--> if = input file
--> of = output file.
--> bs = block size
--> oflag = turns off disk caching
--> This command creates a 1gb file in the speed directory.
Run this command:
dd if=/dev/zero of=4gb.img bs=1G count=4 oflag=dsync
→ This command creates a 4gb file in the current directory.
Run this command:
time dd if=1gb.img of=/dev/null bs=8k
→ Note: This command reads the 1gb.img file in 8k block sizes.
→ View the results
→ Run the time command again and view the results. It should be faster because the file is cached.
Run this command:
time dd if=4gb.img of=/dev/null bs=8k
→ Note: This command reads the 4gb.img file in 8k block sizes
→ View the results
Run the time command again and view the results. It should be faster because the file is cached.

Mount remote Linux resource
mount [ip_or_dns]:/[exported_directory] /[mount_point]
mount 137.65.59.41:/share/downloads /mnt/tools

Resolve DNS
dig [hostname.company.com]

ssh -l root [ipaddress]

Run a command on bootup

a. Create the file /etc/init.d/after.local


The content must be:



!#/bin/sh
[whatevercommand]

b. Modify the after.local to have execute permissions


chmod +x after.local

ds

License Registration Issues:
AM_T_LICENSE - all Americas and Canadian cases
APJ_T_LICENSE - all AsiaPac cases
EMEA_T_LICENSE - all EMEA cases

EMEA: mi.Licensing-EMEA@microfocus.com
AMS: mi.licensing-NA@microfocus.com
APJ: LicensesAPAC@microfocus.com

Troubleshooting Registration Communication issues
130.57.66.20 nu.novell.com (old TLS)
130.57.66.5 nu.novell.com (newer TLS)
secure-www.novell.com
curl -v telnet://nu.novell.com:443
suse_register -a email=<email> -a regcode-iprint=<Reg_Code>
suse_register -a email=<email> -a regcode-filr=<Reg_Code>
suse_register -a email=<email> -a regcode-cea=<Reg_Code>
suse_register -d 3 -a regcode-sles=<Reg_Code> -a email=<email> -L /root/suse_register-d3.log
suse_register -a email=<emailaddress> -a regcode-iprint=<reg code>

Using SMT server with older products, such as OES2015.x, Filr 3, iPrint 3: 
1) Install SMT on OES2018.3 or SLES12.5
2) Configure SMT and mirror repos
3) Remove SSLv3 from apache. 
A) Modify /etc/apache2/ssl-global.conf and /etc/apache2/vhosts.d/vhost-ssl.conf
Change: SSLProtocol all -SSLv2 -SSLv3
To: SSLProtocol all -SSLv2
B) rcapache2 restart
4) Configure clients for the SMT server and register.

Connecting to SMT (Trevor's server as an example):
1) suse_register -E (if already registered for something. might need manual registration removal)
2) Download clientSetup4SMT.sh:  http://lava.lab.novell.com/repo/tools/clientSetup4SMT.sh
3) clientSetup4SMT.sh --host lava.lab.novell.com --regcert http://lava.lab.novell.com/smt.crt
4) Register server:  suse_register -a regcode-prod=asdfasdf -a email=user@domain.com


scp examples:
scp -Cr root@137.65.52.43:/home/kwbradford/Data/* /data
scp -Cr [user]@[source]:/dir/dir/filename /destination (this example is used when you are copying to the box where the command is being run from.)

ipcon info gathering:
echo === orientdb status === > /tmp/ipconloginInfo.txt;systemctl status orientdb >> /tmp/ipconloginInfo.txt;echo "" >> /tmp/ipconloginInfo.txt;echo === iprint tomcat status === >> /tmp/ipconloginInfo.txt;systemctl status novell-iprint-tomcat >> /tmp/ipconloginInfo.txt;echo "" >> /tmp/ipconloginInfo.txt;echo === iprint license status === >> /tmp/ipconloginInfo.txt;systemctl status novell-iprint-license >> /tmp/ipconloginInfo.txt;echo "" >> /tmp/ipconloginInfo.txt;echo === zypper ref === >> /tmp/ipconloginInfo.txt;zypper ref >> /tmp/ipconloginInfo.txt;echo "" >> /tmp/ipconloginInfo.txt;echo "" >> /tmp/ipconloginInfo.txt;echo === zypper lr === >> /tmp/ipconloginInfo.txt;zypper lr >> /tmp/ipconloginInfo.txt;echo "" >> /tmp/ipconloginInfo.txt;echo === iprintconf.properties === >> /tmp/ipconloginInfo.txt;less /etc/opt/novell/iprint/conf/iprintconf.properties >> /tmp/ipconloginInfo.txt;echo "" >> /tmp/ipconloginInfo.txt;echo === iprint_mobile0.log file === >> /tmp/ipconloginInfo.txt;tail -n 300 /var/opt/novell/log/iprintmobile/iprint_mobile0.log >> /tmp/ipconloginInfo.txt


Debug iprintgw:
(Open a terminal on the server. Don't do the following steps through a remote session such as Putty)
a. If you are not logged in as root, then su to root.
b. Type screen, hit ENTER, and hit the space bar
c. mv /opt/novell/iprint/bin/iprintgw iprintgwtest
d. rcnovell-ipsmd restart
e. gdb iprintgwtest
f. r -d

Wait for the problem to occur. Do not close either the terminal session. If you close the session, then the Gateway will go away and no one will be able to print. If the problem occurs between 9am and 5pm Mountain Time, give me a call. A developer will then remote into your system and debug the problem.

Some helpful gdb commands (once iprintgw crashes):
bt
f 0
list [put the line # listed from the bt command]
p [variable name listed by the list command]

Capture a core of ipsmd (or any process)
install debug version of novell-iprint-server
ulimit -c unlimited;install -m 1777 -d /var/local/dumps;echo "/var/local/dumps/core.%e.%p" > /proc/sys/kernel/core_pattern;sysctl -w kernel.suid_dumpable=2
rcnovell-ipsmd stop
/opt/novell/iprint/bin/ipsmd -F 0x7FFFFFFF
run iPrint Info script
wait for crash
run the iPrint Info script again
send
- both iPrint Info script output files
- /var/local/dumps/<corefile>
- /var/opt/novell/log/iprint/debug.log

Sample Scripts:

Script to find all files that end in .conf, copy them to /tmp/conf_files, then tar them up.

#!/bin/bash
mkdir /tmp/conf_files
for i in `find /etc -name '*.conf'`
do
cp "$i" /tmp/conf_files/
tar cvf /tmp/ApacheConf.tar /tmp/conf_files/
done

Script to restart a service (apache or ipsmd)

#!/bin/bash
if tail -20 /var/log/apache2/error_log |grep "Segmentation fault"; then
echo "iPrint and Apache were restarted $(date '+%m/%d/%y %H:%M:%S')" >> /tmp/iPrintRestart.log
rcapache2 restart
wait
rcnovell-ipsmd restart
fi

Script to restart the Print Manager if a printer goes NOT BOUND

#!/bin/bash
/opt/novell/bin/iprntman printer -l -u admin -P novell > /tmp/NOT_BOUND_chk
wait
if tail -8 /tmp/NOT_BOUND_chk |grep "Connected"; then
echo "A Printer Agent was in a NOT BOUND state; Print Manager restarted $(date '+%m/%d/%y %H:%M:%S')" >> /tmp/iPrintRestart.log
rcnovell-ipsmd restart
fi

Script to restart CUPS printers in a STOPPED state
######################################
ERR="chkprinter.err"
DEFPRINTER=`/usr/bin/lpstat -t | grep default | awk '{print $4}'`
CHKSTATUS=`/usr/bin/lpstat -t | grep "$DEFPRINTER" | grep disabled`
###################################### exec 2>$ERR

if [ ! -c /dev/lp0 ];then
mknod /dev/lp0 c 6 0
fi

if [ -n "$CHKSTATUS" ];then
logger "chkprinter.s -$DEFPRINTER found disabled on `date`"
# See if there areany jobs qued up
PRTJOBS=`lpstat -o`
if [ -n "$PRTJOBS"];then
logger "chkprinter.s - The following print jobs are being canceled on `date`"
lpstat -o >/tmp/chkprinter.jobs

while read line
do
logger "chkprinter.s - $line"
done </tmp/chkprinter.jobs

for i in `lpstat -o | awk '{print$1}'`
do
cancel $i
done

fi #Now Enable printer
/usr/bin/enable $DEFPRINTER
logger"chkprinter.s - $DEFPRINTER enabled on `date`"
fi


Chromebook Wireless Connection Details:
EAP
PEAP
EAP Phase 2 = Automatic
Server CA certificat = Do not check

Page 2