NetApp commands

A few handy NetApp commands:

Login to the console using SSH.

Check deduplication: df -s
Restart CIFS: cifs restart
Check shares: cifs shares
Domain connection: cifs domaininfo

System Configuration
General information sysconfig
sysconfig -v
sysconfig -a (detailed)
Configuration errors sysconfig -c
Display disk devices sysconfig -d
sysconfig -A
Display Raid group information sysconfig -V
Display aggregates and plexes sysconfig -r
Display tape devices sysconfig -t
Display tape libraries sysconfig -m
Environment Information
General information environment status
Disk enclosures (shelves) environment shelf [adapter]
environment shelf_power_status
Chassis environment chassis all
environment chassis list-sensors
environment chassis Fans
environment chassis CPU_Fans
environment chassis Power
environment chassis Temperature
environment chassis [PS1|PS2]
Fibre Channel Information
Fibre Channel stats fcstat link_stats
fcstat fcal_stats
fcstat device_map
SAS Adapter and Expander Information
Shelf information sasstat shelf
Expander information sasstat expander
sasstat expander_map
sasstat expander_phy_state
Disk information sasstat dev_stats
Adapter information sasstat adapter_state
Statistical Information
All stats stats show
System stats show system
Processor stats show processor
Disk stats show disk
Volume stats show volume
LUN stats show lun
Aggregate stats show aggregate
FC stats show fcp
iSCSI stats show iscsi
CIFS stats show cifs
Network stats show ifnet

How To Wipe The BlackBerry® Clean And Set It Up Again

To erase all the data on your BlackBerry device, complete the following steps. This option is available with
BlackBerry Device Software 3.8 and later.

  1. In the device Options, click Security.
    If you are using BlackBerry Device Software 4.1, click Security Options > General Security.
  2. Click the trackwheel and select Wipe Handheld.
  3. Click Continue.
  4. Type “blackberry”. All the data on the BlackBerry device is erased.

On some new versions of BlackBerry software, the menu navigation is slightly different.

  1. Go to Options.
  2. Select Security Options.
  3. Select General Settings.
  4. Click the Menu key.
  5. Select Wipe Handheld.
  6. Click Continue.
  7. Type “blackberry”. All the data on the BlackBerry device is erased.

Once it is wiped, hard-reset the handheld and perform BlackBerry Wireless Activation again.

How to reset the SafeWord RemoteAccess Administration password

How to reset the SafeWord RemoteAccess Administration password

Issue

The SafeWord RemoteAccess Administration password can be saved and is not required to be entered for administering SafeWord. When adding additional servers, they require the same Encryption Key, Signing Key and Administration password. If this password is unknown it can be reset.

Resolution

1. Make a complete list of all servers that have SafeWord components installed. This includes Servers, Agents, and SDK applications. Components include:

- SafeWord Core Servers (Database, Admin, Authentication Engine / AAA)
- Web Servers (Web Logon Server (WLS), Enrollment Server (ES))
- User Center
- SafeWord Administration Console
- Citrix Web Interface Agent
- RADIUS (IAS Agent, RADIUS, Ascend RADIUS, RADIUS Accounting)
- Outlook Web Access Agent (OWA), Universal Web Agent (UWA)
- Domain Logon Agent (DLA)

2. Stop all SafeWord server services (Admin, Authentication Engine / AAA Server, Web, RADIUS).

3. Stop all services that are using SafeWord Agents (e.g., IIS and IAS).

4. Remove any swec.md5 or swec.dat files (first stop any RADIUS services if they are running or exist, then delete the swec.md5 file/s. Then restart any RADIUS services) on all servers containing SafeWord components. Their location can vary, so search the entire computer. These swec files are often recreated when the service is stopped, so it’s imperative that you stop the service before doing the search.

5. Remove all of the following pem files on all SafeWord servers and Admin Console computers.

…\SERVERS\AdminServer\certificates\cacert.pem
…\SERVERS\AdminServer\certificates\cakey.pem
…\SERVERS\AdminServer\certificates\SccAdminServer.pem
…\SERVERS\AAAServer\certificates\SccAAAServer.pem
…\AdminConsole\certificates\PremierAccess_Administrator_Console.pem

6. Delete all client entries from the Admin Server’s clients.ini file. The clients.ini file is extensively documented if you require more information.

…\SERVERS\AdminServer\certificates\clients.ini

Do NOT delete these two lines. Increase the value of AcceptNewCertificates if necessary.

$AcceptNewCertificates=50 $AcceptNewCertificatesDefaultPolicy=always

7. Delete all server entries from the Admin Server’s and Admin Console’s servers.ini file. The servers.ini file is extensively documented if you require more information.

…\SERVERS\AdminServer\certificates\servers.ini
…\AdminConsole\certificates\servers.ini

Do NOT delete this line.

$AcceptNewCertsDefaultPolicy=never

8. Start services in this order.

a. SafeWord Database Server services
b. Admin Sever services
c. SafeWord Authentication Engine (AAA Server) services
d. All remaining services

Source : http://theether.net/kb/100168

Setting primary monitor (dual monitors) on Ubuntu 10.10

I have my laptop connected to an external monitor, and I want the external monitor to be the primary display (i.e. with the menu bar displayed on it.) For some reason, there’s no GUI element to set this. I had to read a bunch of man pages, but when all else fails, trusty old xrandr to the rescue:

vijayp@ike:~$ xrandr --output HDMI1 --primary

In case you don’t know what your display is called, just run “xrandr” on its own. This is what my laptop says:

vijayp@ike:~$ xrandr
Screen 0: minimum 320 x 200, current 2880 x 1200, maximum 8192 x 8192
VGA1 disconnected (normal left inverted right x axis y axis)
LVDS1 connected 1280x800+0+0 (normal left inverted right x axis y axis) 261mm x 163mm
   1280x800       60.0*+
   1024x768       60.0
   800x600        60.3     56.2
   640x480        59.9
HDMI1 connected 1600x1200+1280+0 (normal left inverted right x axis y axis) 367mm x 275mm
   1600x1200      60.0*+
   1280x1024      75.0     60.0
   1152x864       75.0
   1024x768       75.1     60.0
   800x600        75.0     60.3
   640x480        75.0     60.0
   720x400        70.1
DP1 disconnected (normal left inverted right x axis y axis)

Android: Force Moving Apps to an SD Card

This isn’t anything new but I thought I would share my experiences of trying to free space on my HTC desire by forcing apps to be movable to the sd card using the android SDK on linux.

WARNING: Ensure you have a backup of any important data before you start in case something goes wrong. Carrying out these instructions is at your own risk.

Running out of space is really the only annoyance I have come across since owning an android phone. Every now and again the low space icon comes up and you have to try and free up some space.

Since Froyo you’ve been able to move certain apps to SD card, but it’s only if the developer allows it. If you’re an android developer and you want to know how to do it, see this post: Enabling the Android Move To SD Card Feature

So if you’re stuck with a bunch of apps you can’t move by default because “Move to SD Card” is greyed out in “Settings -> Applications -> Manage Applications -> Appname” then you might be thinking it’s not possible. However, it is possible to change the default install location to SD card via adb.

Introducing the Android Debug Bridge

Adb is the Android Debug Bridge which comes as part of the SDK. If you don’t have the SDK the first thing you will need to do is install it (get it fromdeveloper.android.com). Once you have the SDK you can find the adb tool in /platform-tools/, though in my case I have it at /tools/.

After you’ve installed the SDK you’ll need to connect your phone to your computer using the USB data cable. You’ll also need to make sure that debugging is possible by visiting “Settings -> Applications -> Development” and checking “USB Debugging”.

Enabling moving of apps to SD card

To change the the install location we are going to run the pm command via the adb shell. Here’s the details of the pm command:

The setInstallLocation command changes the default install location
  0 [auto]: Let system decide the best location
  1 [internal]: Install on internal device storage
  2 [external]: Install on external media

To change the default install location to the SD card (which also enables moving most apps to the SD card.) run the following from the dir containing the adb command:

./adb shell pm setInstallLocation 2

If you at any point hit the following:

error: insufficient permissions for device

Try doing this:

./adb kill-server
sudo ./adb  start-server

You should now find you can run the above commands without error.

Insufficient Storage Available

The other error I had was that when I was trying to move any app after changing the default install location to the SD card was something along the lines of “Unable to move application. Insufficient Storage”.

The way I got around this was to uninstall twitter which was using about 17mb (it was the largest app). After that I re-installed it and it used far less space (naturally as the data would have been removed by the re-install process). After that I was able to successfully move most of my remaining apps (twitter included) to my SD card.

Re-setting the installation location back to auto

I’d strongly recommend re-setting the default installation location when you are done moving apps. The reason for this is that apps will fail to be installed directly to the external location, at least this is what I experienced when trying to re-install the twitter app.

To reset the install location to automatic (let the system decide) use the following:

./adb shell pm setInstallLocation 0

Should you forget where it was left at you can always run:

./adb shell pm getInstallLocation

e.g:

$ ./adb shell pm getInstallLocation
0[auto]

Source : Muffinresearch

GPG error: http://ppa.launchpad.net

When you get GPG errors when running apt-get update on your Ubuntu machine, you have to import the the appropriate keys.

W: GPG error: http://ppa.launchpad.net lucid Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 4DEF31B9A9E345C0
W: GPG error: http://ppa.launchpad.net lucid Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 0F678A01569113AE
W: GPG error: http://ppa.launchpad.net lucid Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7889D725DA6DEEAA
W: GPG error: http://ppa.launchpad.net lucid Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY FD58F8C9E8EF47D2
W: GPG error: http://ppa.launchpad.net lucid Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY AF5ED91C56978EF9
W: GPG error: http://ppa.launchpad.net lucid Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 464AD83D4631BBEA
W: GPG error: http://ppa.launchpad.net lucid Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 6AF0E1940624A220
W: GPG error: http://ppa.launchpad.net lucid Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 5A9A06AEF9CB8DB0
W: GPG error: http://ppa.launchpad.net lucid Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8CA7A6E8E4FA953A

Just run the following command :

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys KEYID

where KEYID is number shown in error msg

You can also import all the keys automatically. Tutorial here.

http://www.webupd8.org/2010/05/autom…l-missing.html

Changing password complexity ESX(i) 4

Some have noticed that the password requirements for ESXi 4.0 logins have become more stringent. In some cases, it may be desirable to edit those settings to make the password standards for ESXi 4.0 either stronger or weaker. Password requirements for ESXi are controlled by the file /etc/pam.d/common-password. Changes to this file will take effect immediately and will not require a reboot. The sticky bit for the file is enabled, so changes will be backed up into the system configuration backup file for the host. As this is not a supported changed, caution is advised and a system backup is recommended before making changes.

By default the common-password file will contain the following text and it is the min option (min=a1,a2,a3,a4,a5) that will control password complexity.

#%PAM-1.0
password requisite /lib/security/$ISA/pam_passwdqc.so retry=3 min=8,8,8,7,6
password sufficient /lib/security/$ISA/pam_unix.so use_authtok md5 shadow
password required /lib/security/$ISA/pam_deny.so

a1 is the password length for passwords that contain one character class. The character classes are lower case characters, upper cases characters, digits and other characters. a2 is the password length for passwords that contain 2 character classes. a3 is used for password phrases. a4 and a5 is the password length required when using 3 or 4 character classes. It should be noted that the first and last character of the password will not count towards the character class count. So the password of ‘Password’ will only have 1 character class, while the password of ‘PassWord’ will have 2.

Note: the values for a1 to a5 must be equal or smaller than the prior value, so min=8,7,7,6,5 will be valid, but min=7,8,9,8,7 will not be. If min=7,8,9,8,7 were used, the error ‘User name or password has an invalid format’ would be generated even if you used a single class password will a length of 7 or more characters.

Sample changes to password complexity

1) To reduce the minimum password length to 6 characters, set min=6,6,6,6,6. As noted above, the values used for a1 to a5 must not be larger than the prior value.

2) To disable the use of one or two class passwords, set min=disabled,disabled,8,8,6. Note that this setting, password of ‘Password1′ would not be valid as the character class count would only be one. A password of ‘pAssw0rd’ would have a class count of 3 and thus be acceptable with a length of 8.

3) To turn off the enforcing of strong passwords, use the enforce option. Valid values for the option are none, users and everyone. So if the common-password file is changed to the below, then a single character password will be allowed regardless of the settings for the min option.

#%PAM-1.0
password requisite /lib/security/$ISA/pam_passwdqc.so retry=3 min=8,8,8,7,6 enforce=none
password sufficient /lib/security/$ISA/pam_unix.so use_authtok md5 shadow
password required /lib/security/$ISA/pam_deny.so

Source: vm-help.com

ESXi 4 Enable SSH

ESXi 40 does ship with the ability to run SSH, but this is disabled by default (and is not supported). If you just need to access the console of ESXi, then you only need to perform steps 1 – 3.

1) At the console of the ESXi host, press ALT-F1 to access the console window.
2) Enter unsupported in the console and then press Enter. You will not see the text you type in.
3) If you typed in unsupported correctly, you will see the Tech Support Mode warning and a password prompt. Enter the password for the root login.
4) You should then see the prompt of ~ #. Edit the file inetd.conf (enter the command vi /etc/inetd.conf).
5) Find the lines that begins with #ssh and remove the #. Then save the file. If you’re new to using vi, then move the cursor down to #ssh line and then press the Insert key. Move the cursor over one space and then hit backspace to delete the #. Then press ESC and type in :wq to save the file and exit vi. If you make a mistake, you can press the ESC key and then type it :q! to quit vi without saving the file. Note: there are two lines for SSH with ESXi 4.0 now – one for regular IP and the other for IPv6. You should the line appropriate to the protocol you’ll use to access your host.
6) Once you’ve closed the vi editor, you can either restart the host or restart the inetd process. To restart inetd run ps | grep inetd to determine the process ID for the inetd process. The output of the command will be something like 1299 1299 busybox inetd, and the process ID is 1299. Then run kill -HUP
(kill -HUP 1299 in this example) and you’ll then be able to access the host via SSH.

Tip – with some applications like WinSCP, the default encryption cipher used is AES. If you change that to Blowfish you will likely see significantly faster transfers.

Changing the port for SSH

To change the port for SSH, edit the file /etc/services and change the SSH port listed in the file. Save the file and repeat step 6 above.

Enable Telnet

The steps are the same as with SSH, but you’ll remove the # from the 2 telnet entries in /etc/inetd.conf. Enabling telnet is not recommended if security is a concern.

You can also download an oem.tgz file which will enable SSH (and FTP). Copy the file to a datastore with the VI client and then to bootbank with the command cp /vmfs/volumes//oem.tgz /bootbank/oem.tgz and then reboot.

Enable SSH access for a non-root account

Use the following process to enable SSH access for a non-root account
1) Access SSH or the console with a root account.
2) Create a new account with the command useradd -M -d/ . This will set the home directory to / instead of requiring a /home directory.
3) Use the command passwd to set the password for your new login.
4) Edit the passwd file with vi /etc/passwd. For the entry for your new account, change the /bin/sh part to /bin/ash. Save the file and exit. See the example for the test1 user below.

root:x:0:0:Administrator:/:/bin/ash
nobody:x:99:99:Nobody:/:/sbin/nologin
nfsnobody:x:65534:65534:Anonymous NFS User:/:/sbin/nologin
dcui:x:100:100:DCUI User:/:/sbin/nologin
daemon:x:2:2:daemon:/:/sbin/nologin
vimuser:x:12:20:vimuser:/sbin:/sbin/nologin
test1:x:500:500:Linux User,,,:/:/bin/ash

You should now be able to connect with SSH using this new account.

Disable SSH access for the root account

If you have created non-root accounts for SSH access you can also disable root access via SSH. Edit the /etc/inetd.conf file using the initial process on this page and add the option -w after the -i option. The line in inetd.conf will appear similar to the below.

ssh stream tcp nowait root /sbin/dropbearmulti dropbear ++min=0,swap,group=shell -i -w -K60

One you have made the change, save the file and run the kill -HUP command to restart the inetd process. You will now be able to login with a non-root account, but will get access denied if you use a root account. Once you have established a SSH session with your non-root account you can issue the command su – to switch to the root account.

Source : vm-help.com

How to Reset Your Lost Joomla Password in a few Easy Steps

Before we begin, you must have access to your database. If you don’t, pass these instructions on to someone that does. It’s also a good idea to backup your database before making changes, just in case something goes awry.
Finding the Password

Log in to your Joomla database (via phpMyAdmin for example)
Click to edit the _users database (will be preceded by your account name, for example: example_users)
Edit the entry for where usertype = “Super Administrator” (should be the first record)

Resetting the Password

In the password field you’ll notice a string of characters. Joomla uses a one-way encoding method, which means you won’t be able to retrieve your old password. However, you will be able to reset the password to a new one using mySQL’s built in MD5 function:

UPDATE example_users SET password=MD5(‘new password’) WHERE usertype = “Super Administrator”;

Voila – you just successfully reset your Joomla password Smiling Go to your joomla domain at example.com/administrator and try logging in with the new password. You should be logged in as Super Administrator.
Copying the Password from Another User

An alternate method to reset your password, if you’re not comfortable with SQL commands, is to simply copy and paste the password hash from another user (to which you know the password) over to your admin user. You’ll then be able to login as the admin user using that password. If you don’t have another user, you should be able to register as one, and then copy the password over.
Applying the Email From Another User

Yet another alternate method to retrieving your lost Joomla admin password is to change your admin user’s email address to one you are familiar with. Then use the lost password retrieval function (the “forgot password” link in the login section) to have your Joomla password emailed to you.

Unable to Mount ISOs to VMs after vSphere 4.1 Upgrade

Some people are experiencing issues mounting ISO files to VMs after performing a vSphere 4.0 to 4.1 upgrade.  Symptom includes receiving the error message “The remote device on VMNAME connected to PathToISOFile is disconnected.”  after attempting to mount an ISO file from within the vSphere client.  This issue appears to be a client incompatibility issue related to co-existance of vSphere Client 4.0 and 4.1 on the same machine.  To resolve the issue:

  1. Uninstall vSphere Client 4.0
  2. Uninstall vSphere Host Update Utility 4.0 (if it is installed)
  3. Uninstall vSphere Client 4.1.
  4. Reinstall vSphere Client 4.1.
  5. Attempt to reconnect an ISO file to a VM using the vSphere Client.

I was experiencing this same issue and following the above steps cleared it up.  Hope this helps other people out there.

Source : Jargon Technology