Rabu, 07 September 2016

Changing the Postfix maximum email size

I've recently had some of my customers emailing me large image attachments and my Postfix mail server has been rejecting them. A quick look at the postfix configuration showed the message size limit was the default so I needed to increase it. This post looks at how to see what the current email message size limit is with Postfix and how to change it.
The configuration option is "message_size_limit" and by default is set to 10240000 bytes which is roughly 10MB. You can see what setting your postfix install is currently using by issuing the following command:
postconf | grep message_size_limit
Just doing "postconf" on its own will show all the options so using grep on "message_size_limit" filters the output to just the setting we want. For the default setting, you'll see this:
message_size_limit = 10240000
To change the setting to some other value, open the main.cf file in your favourite text editor (it's often at a location like /etc/postfix/main.cf) and either edit or add the following line, depending if it's already in the file or not.
message_size_limit = 20480000
In the above example I've changed it to ~20MB.
Then reload postfix like so:
service postfix reload
and your setting will take effect. You can query postconf again if you want to check all is as expected.

Troubleshooting the vCenter Server Appliance with Single Sign-On login (2033338)

Details

  • The two most common network-related problems when connecting to a vCenter Server Appliance using the Web Client and Single Sign-On (SSO) are SSL certificate failure and a changed SSO server IP address.
  • You see these errors:
    • Failed to connect to VMware Lookup Servicehttps://vCVA_IP_address:7444/lookupservice/sdk - SSL certificate verification failed.
    • Failed to communicate with the vCenter Single Sign On server https://vCVA_IP_address:7444/ims/STSService.

Solution

If the SSO SSL certificate failed, the network identification for the vCenter Server Appliance has changed, but the SSO SSL certificate has not been updated to match it. For instructions on changing the certificate,

Note: These issues affect the Web Client and other related services running within the vCenter Server Appliance. These steps involve logging into the vCenter Server Appliance Management Interface (VAMI) which should not be affected.

To resolve this issue, toggle the certificate settings.
To toggle the certificate settings:
  1. Log in to the vCenter Server Appliance Web interface at https://hostname:5480/.
  2. Click the Admin tab.
  3. Regenerate certificates:
    • vCenter Server 5.1: Select Toggle certificate setting so that the Certificate regeneration enabled displays Yes.
    • vCenter Server 5.5: Select Yes under Certificate regeneration enabled.
  4. Click Submit.
  5. Restart the vCenter Server Appliance.
  6. After the vCenter Server Appliance restarts, confirm that the Certificate regeneration enabled option is set to disabled.
Notes:
  • vCenter Server generates new default certificates using this option. For systems that use custom certificates, regenerate the certificates manually.
  • Regeneration of default certificates takes longer time to complete.

Rabu, 30 Maret 2016

Checksum on Solaris OS

Here i share how to checksum file or folder on Solaris OS :
  on file
$ sum  <filename>
$sum ABC.dmp
21882 7592 ABC.dmp
 
 on folder
tar cf - <directory name> | sum - 

Senin, 29 Juni 2015

Oracle Solaris 10. UX: userdel: ERROR: Inconsistent password files. See pwconv(1M).

There is something wrong with user deleting in solaris 10, 
while you want to delete or add user, , and now you are getting following persist errors:

On USERADD : UX: userdel / useradd: ERROR: Inconsistent password files. See pwconv(1M).

Cause :
in case you did manual delete entry in /etc/passwd? or something in like that way progress. 

Solution : Just make sure to remove lines relative to user you want to recreate in following files .
- /etc/opasswd
- /etc/oshadow
- /etc/passwd
- /etc/shadow
- /etc/user_attr

And remember that you should not leave blank lines in this files!!!

Kamis, 26 Februari 2015

Netapp Replace Disk

f3220wom2> disk show -n
  DISK       OWNER                      POOL   SERIAL NUMBER         HOME
------------ -------------              -----  -------------         -------------
3d.11.21     Not Owned                  NONE   6SL8S9B50000N44801MD

step to do in replace disk netapp storage
disk assign 3d.11.21

Selasa, 03 Februari 2015

bzip2 compression

to extract in from .bz2 , use below
bzip2 -cd files.tar.bz2 | tar xvf -

and to compress into .bz2 , use below
bzip2 -cd files.tar.bz2 | tar tvf -

Setting up PostgreSQL on Solaris



Setting up PostgreSQL on Solaris
PostgreSQL is bundled with Solaris 10 and is available from the primary OpenSolaris IPS repository.
To check if PostgreSQL is installed in your Solaris instance you can use the following command:

$ svcs "*postgres*"
STATE          STIME    FMRI
disabled       Feb_16   svc:/application/database/postgresql:version_81
disabled       16:11:25 svc:/application/database/postgresql:version_82

Install Required Packages
If you don't see any PosgreSQL instance in your Solaris box then proceed and install the following packages (the list may actually change over time):
  • SUNWpostgr
  • SUNWpostgr-contrib
  • SUNWpostgr-devel
  • SUNWpostgr-docs
  • SUNWpostgr-jdbc
  • SUNWpostgr-libs
  • SUNWpostgr-pl
  • SUNWpostgr-server
  • SUNWpostgr-server-data
  • SUNWpostgr-tcl

Check if PostgreSQL SMF Services are Configured
After installation, SMF services should be listed by (the output may depend on the actual PostgreSQL version you installed):

$ svcs "*postgres*"
STATE          STIME    FMRI
disabled       Feb_16   svc:/application/database/postgresql:version_81
disabled       16:11:25 svc:/application/database/postgresql:version_82

On Solaris, PostgreSQL is managed by the SMF framework. If you're curious you can check the service manifest at /var/svc/manifest/application/database/postgresql.xml and the service methods at /lib/svc/method/postgresql. Many important parameters are stored in the service configuration file (postgresql.xml): if you want to change some parameters (such as PostgreSQL data directory) you must use svccfg to edit the service configuration.

PostgreSQL and RBAC
PostgreSQL on Solaris uses RBAC to give users permissions over the database instance. When you install Solaris' PostgreSQL packages an RBAC role is setup for you:

[/etc/passwd]
postgres:x:90:90:PostgreSQL Reserved UID:/:/usr/bin/pfksh
This user is setup as an RBAC role in /etc/user_attr file:

[/etc/user_attr]
postgres::::type=role;profiles=Postgres Administration,All

Permission for the Postgres Administration profiles are setup in the /etc/security/exec_attr file:

[/etc/security/exec_attr]
Postgres Administration:solaris:cmd:::/usr/postgres/8.2/bin/initdb:uid=postgres
Postgres Administration:solaris:cmd:::/usr/postgres/8.2/bin/ipcclean:uid=postgres
Postgres Administration:solaris:cmd:::/usr/postgres/8.2/bin/pg_controldata:uid=postgres
Postgres Administration:solaris:cmd:::/usr/postgres/8.2/bin/pg_ctl:uid=postgres
Postgres Administration:solaris:cmd:::/usr/postgres/8.2/bin/pg_resetxlog:uid=postgres
Postgres Administration:solaris:cmd:::/usr/postgres/8.2/bin/postgres:uid=postgres
Postgres Administration:solaris:cmd:::/usr/postgres/8.2/bin/postmaster:uid=postgres

Starting PostgreSQL
You can start PostgreSQL using the following SMF command from an account with the appropriate privileges:

$ su - postgres
$ svcadm enable svc:/application/database/postgresql:version_82

Initial Configuration
By default, PostgreSQL is configured to trust all of the local users. That's not a good practice because all your local users may connect to PostgreSQL as a superuser. The first to do is setting up a password for the postgres user:

$ psql -U postgres
postgres=# alter user postgres with password 'your-password';
Exit psql with the \q command and change the /var/postgres/8.2/data/pg_hba.conf file to set an appropriate authentication method and change the following line:

[/var/postgres/8.2/data/pg_hba.conf]
local all all trust

with, for example:

[/var/postgres/8.2/data/pg_hba.conf]
local all all md5

Next time you connect, PostgreSQL will be asking you for the user password. Now, let's refresh the PostgreSQL service so that PostgreSQL will receive a SIGHUP signal an re-read the pg_hba.conf file:

$ svcadm refresh svc:/application/database/postgresql:version_82

Done!
You're now running a PostgreSQL instance on your Solaris box ready to be given to your database administrator, ready for production use.