RSUSR070 (Show Roles and their Long Text Descriptions)
SM02
Send System Message
SM04
User List (Local System)
SM12
Administer Lock Entries
SM13
Administer Update Records
SM21
View System Log
SM37
Display/Monitor Background Jobs
SM50/SM66
Administer Work Processes
SM51
Show Application Servers
SM59
RFC Connections
SMLG
Define/Maintain Logon Groups
SNOTE
Note Browser
STMS
Transports
SU53
Display Auth Data: "Why did my last transaction fail?"
SU56
Show me my authorizations
SUIM
System User Information
Info on how to lock and unlock from the Oracle level.
To lock a single user called test in client 600
SQL> update sapr3.usr02
set uflag=64 where bname='TEST' and mandt=600;
To unlock the same user
SQL> update sapr3.usr02
set uflag=0 where bname='TEST' and mandt=600;
To lock all users in client 600
SQL> update sapr3.usr02
set uflag=64 where bname in
(select bname from sapr3.usr02)
and mandt=600
To unlock all user in client 600
SQL> update sapr3.usr02
set uflag=0 where bname in
(select bname from sapr3.usr02)
and mandt=600
If you wanted to modify this to include multiple clients
SQL> update sapr3.usr02
set uflag=0 where bname in
(select bname from sapr3.usr02)
and mandt in (100,120,600)
# MySQL
The most important thing to remember about installing MySQL is that there are two accounts with no passwords created by
default with root privs on some databases. These accounts can only connect from localhost. Also, there are two built-in root
accounts that have no passwords. These have to be fixed.
Run the following commands:
# mysql -u root
mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('newpwd');
mysql> SET PASSWORD FOR 'root'@'%' = PASSWORD('newpwd');
mysql> delete from mysql.user where User="";
mysql> FLUSH PRIVILEGES;
Dump table "hosts" to a text file:
select * from hosts into OUTFILE '/tmp/blah' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"';
Load data into table "hosts" from a text file:
load data infile "blah" into table hosts FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"';
modify /etc/vfstab to show original Solaris partitions before Volume Manager was installed (vfstab.prevm)
modify /etc/system so that the following lines show as:
*rootdev:/pseudo/vxio@0:0
*set vxio:vol_rootdev_is_volume_=1
Break the root mirror
Reboot
You can also perform most of this operation if you boot from CD or Network, and mount your boot drive under /a. For
instance, if you hose you are patching a system, and split the root mirror before you start, you can manually unencapsulate
your root mirror copy, appropriately edit the vfstab on the root mirror, then (hopefully) boot from the root mirror.
Fix a disk that won't encapsulate (also from Veritas Document ID 230661).
Remove partitions that are tagged with a 14 and 15 from the disk. I usually accomplish this by the following:
Print VxVM configuration for all disk groups:
# vxprint -htA
Create a VxVM Volume:
# vxassist -g make
ex.
vxassist -g rootdg make scratch 5G
vxassist -g ora-dg make vol01 32712m nstripe=2 (Striping the volume across 2 disks)
vxassist -g miscdg make scratchvol 14g layout=mirror miscdg01 miscdg03
(mirrored on disks miscdg01 and miscdg03)
Mirror the rootdg:
# vxrootmir -a target
ex.
vxrootmir -a dsk1
"Un-Fail" a drive:
# vxedit -g sm1sapdg set failing=off
List disk groups:
# vxdg list
When you get disks showing up in vxdg list that you KNOW you have removed, you'll need to:
# vxdisk rm disk
Rename a dg:
# vxdg -n deport # vxdg import
Delete a volume:
# vxvol -g dg stop volume # vxvol on VxVM
# vxedit -g dg -r rm volume # vxedit on VxVM
Remove plexes from a mirror:
# vxplex -g dg -v volume dis plex_name # vxedit -g dg -r rm plex_name
Remove a disk quickly (make sure no sub-disks are in use first):
# vxdg -g dg rmdisk disk_name
Quickly break the root-mirror for patching. This assumes that your mirrored plex is called "rootvol-02" which is the
default.
# vxprint -htg rootdg | egrep '^v|^pl' | grep root
# vxplex -g rootdg -v rootvol dis rootvol-02
Reattach "rootvol-02" plex to rootvol after patching:
# vxplex -g rootdg att rootvol rootvol-02
# Tru64/Alpha
Force interfaces to 100 FDX from SRM console:
>>> set ewa0_mode FastFD
>>> set ewb0_mode FastFD
RPM borks when system is booted w/ AutoFS daemon enabled. Older automount
daemon seems to work fine. You can over-ride installs with rpm --ignore-size,
but there doesn't seem to be a work-around for rpm --erase
You have to allow the CPQ snmp agent to use public on the primary interface
for Performance Manager to actually work. You should be able to limit access
to locahost maybe??
Blow away and re-create partitions on a disk:
# disklabel -z # disklabel -rw
View disk label:
# disklabel -r
**NOTE** running disklable w/o the -r will show you a CACHED COPY OF THE LABEL!!!
Grow an LSM+ADVFS volume:
Create a new LSM volume w/ volassist make command...
> show raidsets
Name Storageset Uses Used by
------------------------------------------------------------------------------
R1 raidset DISK10000 D100
DISK20000
DISK30000
DISK40000
DISK50000
R2 raidset DISK10100 D200
DISK20100
DISK30100
DISK40100
DISK50100
> delete D100
> delete R1
Create a RAID set:
> add raidset R1 DISK&tl;BLAH> DISK&tl;BLAH2> DISK&tl;...>
> add units D100 R1
> set D101 WRITEBACK_CACHE
> set R1 RECONSTRUCT=FAST (optional. If you enable this, be sure to disable it after the reconstruct is done.)
Set HSZ time:
> set this time=16-Jul-2003:hh:mm:ss
DEC SWXRC controllers:
To configure the array, you need to copy ra200rcu.exe from the firmware CD
to a DOS formatted floppy. Stop the console at the SRM boot prompt, type
ARC[enter] to run the ARC console, then run
a:\ra200rcu.exe
Setting up AUTOMOUNT daemon:
[root@spiderman autofs]# /usr/sbin/rcmgr -c set AUTOMOUNT 1
[root@spiderman autofs]# rcmgr -c set AUTOMOUNT_ARGS "-m -f /etc/auto.master"
Please try to make your CATEGORY always == MYORG, where MYORG is a name you've chosen to identify your site. i.e. You should always use the same category for all the packages you make, unless you have a good reason not to.
Where <pkgname> is a file name equal to <PKG from the .pkginfo
file>-<Version>-sol<Version of Solaris>-<ARCH from .pkginfo>-<32 or 64 depending
of if the package was compiled as 32 bit or 64 bit, not the OS>-local
For this package, the package file is named:
MYORGopenssh-3.7.1p2-sol8-sparc-32-local
Save the prototype, pkginfo, depend, preinstall, and/or postinstall somewhere useful. When a new version comes out, you may have to rebuild the package.
Test the package. Preferably on a machine other than the one you built on, and definately on a non-production system.
Package depend files look like this:
[steelmi1@batman openssh-3.7.1p2]$ cat depend
P MYORGssl OpenSSL
P MYORGzlib Zlib
I MYORGssh OpenSSH
Package pre/post installs look like normal shell scripts. The
#!/bin/sh
at the top is not needed, and probably
ignored..
# Linux
Force eth0 to 100/Full:
# ethtool -s eth0 autoneg off speed 100 duplex full
# EMC/TimeFinder
Misc. Symmetrix/Timefinder commands:
syminq -> Disk query. Prints UNIX device and SYM ID.
symcfg discover
symdg create <dg_name>
symdg list
symld -g <dg_name> add dev [01A | disk ID] -sid [ SYM ID ]
symbcv -g <dg_name> associate dev 1F1
symdg show <dg_name>
symmir -g <dg_name> full establish -> (y/n) -> y
symmir -g <dg_name> query [ -i seconds [
symmir -g <dg_name> split [ -instant (default, recoverable Oracle) | -consistent (restartable Oracle ]
symcfg list
symqos
symdg vg2dg <source_dg> <dest_dg> -dgtype REGULAR -> copy VxVM dg to SYM dg.
Put the following into /etc/default/sendmail on Solaris to run in queue-only mode:
MODE=
QUEUEINTERVAL=15
Use the following sendmail.mc file on Solaris 9 to create a "Null Client" version of sendmail.conf:
divert(0)dnl
VERSIONID(`@(#)main.mc 1.5 (Sun) 08/10/00')
OSTYPE(`solaris8')dnl
DOMAIN(`solaris-generic')dnl
FEATURE(`nullclient', `myserver')dnl
DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl
dnl MAILER(`local')dnl
dnl MAILER(`smtp')dnl
1. cd /usr/lib/mail/cf
2. Create a new file called "nullclient.mc"
3. Paste the above lines into nullclient.mc. Make sure there are no leading spaces.
The M4 macro language is very snarky.
4. Change myserver to the hostname of your actual mail server. If you are doing this on a Solaris machine
behind your cable modem at home, you'd use whatever SMTP server your cable company told you to use
for sending email.
5. Run "make nullclient"
6. cp nullclient.cf /etc/mail/sendmail.cf (You DID back up /etc/mail/sendmail.cf first, right? Right?)
7. /etc/init.d/sendmail stop; /etc/init.d/sendmail start
On Tru64 put
O DaemonPortOptions=Port=smtp,Addr=127.0.0.1, Name=MTA
in
sendmail.cf to prevent it binding to all network interfaces
Compile arts with ./configure --prefix=$KDEDIR --with-qt-dir=$QTDIR ; make ; make install
Compile kdelibs with ./configure --prefix=$KDEDIR --with-qt-dir=$QTDIR ; make ; make install
(Had to ln -s /usr/local/bin/m4 /opt/sfw/bin/gm4 for some reason)
(Also had to go into kioslave/ftp and do a make clean; make for top level
make to complete).
Compile kdebase with ./configure --prefix=$KDEDIR --with-qt-dir=$QTDIR ; make ; make install
Compile kdeutils with ./configure --prefix=$KDEDIR --with-qt-dir=$QTDIR ; make ; make install
Compile kdenetwork with ./configure --prefix=$KDEDIR --with-qt-dir=$QTDIR ; make ; make install
Compile kdeartwork with ./configure --prefix=$KDEDIR --with-qt-dir=$QTDIR ; make ; make install
Compile kdegraphics with ./configure --prefix=$KDEDIR --with-qt-dir=$QTDIR ; make ; make install
Compile kdegames with ./configure --prefix=$KDEDIR --with-qt-dir=$QTDIR ; make ; make install
Compile kdemultimedia with ./configure --prefix=$KDEDIR --with-qt-dir=$QTDIR ; make ; make install
Compile kdeaddons with ./configure --prefix=$KDEDIR --with-qt-dir=$QTDIR ; make ; make install
.bat -i u1pcu1
You need to do this for u1pcu1, u1pcu2, u2pcu1, u2pcu2
# CPIO
Backup syntax:
cd ; find . -depth -print | cpio -oV -O /dev/
Restore syntax:
cd ; cpio -idmuV -I /dev/ *.*
GNU's cpio seems to barf at 2GB when dumping to a file, even if the file
system supports files >2GB. The fix for this is to cat the backup file and pipe that to cpio.
# cat blah.cpio | cpio -idumV -I - *.*
(I haven't tested this in a while, may be slightly wrong).
# VIM
fx => search for next occurence of x on the current line
Fx => s/next/previous
qa => Start recording macro "a" ends when you press q again.
@a => plays back macro "a" that you have already recorded.
ma => create a mark called "a"
d`a => delete to mark "a"
y`a => yank to mark "a"
:split => split the editing window half
:split => open a new window with
CTRL + w => make the next higher editing window active
CTRL + w => make the next down editing window active
:q in a split window => close that split
v => one character at a time visual mode
V => one line at a time visual mode
CTRL + v => column at a time visual mode
once you have selected something in visual mode, you can use y (not yy)
to yank and d (not dd) to delete it.
gd => searches for local declaration of the variable your cursor is on
Gd => searches for global declaration of the variable your cursor is on
K => look for man page on the current word the cursor is on
:fixdel => if your delete/bs key doesn't do what you think it should it
tries to fix it
:r ! => runs a command and dumps its output into the file
you're editing
:digraphs => shows you what letters to type in order to insert strange
characters.
ex.
° can be created by typing CTRL + K DG while in insert mode
"nyy => yank to register "n"
"*yy => yank to system clip-board. Middle mouse click to paste, as
normal
Range: How to operate over a range of lines in your file
n,$ => line n to the last line
% => every line
ex:
:15,$s/blah/doh/g
Substitutes the word doh in place of blah for lines 15 - the end.
:%!sort
runs sort on every line in the file
Getting rid of control characters in your text:
Put your cursor on the character and type "ga" This will tell you the ASCII number for the character.
:%s/CTRL+V<ASCII Number>//g
# Shooting
Known "Safe" Commercial .308 Winchester loads for 7.62 NATO chambered rifles: