Recent Posts

Uncategorized

How To: Remove index.php from owncloud url path

Posted on April 16, 2013

When installing owncloud on your own server, the path looks pretty crappy.

I’d like to change it from this.

https://example.com/owncloud/index.php/apps/files

To this.

https://example.com/owncloud/apps/files

To do this, you need to make sure mod_rewrite is enabled and change the .htaccess in the ROOT directory (example: /var/www/html/owncloud/)

Change it from this.

...snip...
 
RewriteEngine on
RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteRule ^.well-known/host-meta /public.php?service=host-meta [QSA,L]
RewriteRule ^.well-known/host-meta.json /public.php?service=host-meta-json [QSA,L]
RewriteRule ^.well-known/carddav /remote.php/carddav/ [R]
RewriteRule ^.well-known/caldav /remote.php/caldav/ [R]
RewriteRule ^apps/calendar/caldav.php remote.php/caldav/ [QSA,L]
RewriteRule ^apps/contacts/carddav.php remote.php/carddav/ [QSA,L]
RewriteRule ^apps/([^/]*)/(.*\.(css|php))$ index.php?app=$1&getfile=$2 [QSA,L]
RewriteRule ^remote/(.*) remote.php [QSA,L]
 
...snip...

Add the one line.

...snip...
 
RewriteEngine on
RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteRule ^.well-known/host-meta /public.php?service=host-meta [QSA,L]
RewriteRule ^.well-known/host-meta.json /public.php?service=host-meta-json [QSA,L]
RewriteRule ^.well-known/carddav /remote.php/carddav/ [R]
RewriteRule ^.well-known/caldav /remote.php/caldav/ [R]
RewriteRule ^apps/calendar/caldav.php remote.php/caldav/ [QSA,L]
RewriteRule ^apps/contacts/carddav.php remote.php/carddav/ [QSA,L]
RewriteRule ^apps/([^/]*)/(.*\.(css|php))$ index.php?app=$1&getfile=$2 [QSA,L]
RewriteRule ^remote/(.*) remote.php [QSA,L]
 
RewriteRule ^index.php/(.*) $1 [L]
 
...snip...

Then you will need to restart apache.

You Should Support Clintmichigan’s Album “Coeur d’Alene”

My friend Clint Asay (and relative through marriage) has released his new album titled “Couer d’alene” and I’ve been having a great time listening to it. The album is awesome and I’ve included several tracks (the title track and the reprise are beautiful) into my programming playlists to keep me wee fingers coding during the long stretches.

A little background:

Clint scraped together the cash to record this, then turned around and self mixed and released the album. That is amazing! As someone who also creates through writing and music, I have to give anyone who completes something a giant high-five. That stuff is hard. And don’t get me started about releasing something personal like Clint has done. You are exposing your heart and mind to the internet and the world, which tends to be an extremely cruel mistress.

I’ve linked to his music, please stop by and support him when you get a second.

http://clintmichigan.bandcamp.com/

-peace
jared

Oracle 11g Enterprise Manager Error: Invalid Connection Pool. ERROR = ORA-28000: the account is locked

Problem:

You are trying to access the Oracle Enterprise Manager and are getting the following error.

Error:

Invalid Connection Pool. ERROR = ORA-28000: the account is locked

Explanation:

In my instance, the password for the SYSMAN database user was different than the emctl SYSMAN password. Every refresh I could see the errors messages indicating it was trying to connect, and then the account would become locked as the connection failed.

1) you need to track down the sysman/log directory

cd /u01/app/oracle/product/11.2.0/dbhome_1/example.com_orcl/sysman/log

2) tail the following log file

tail -f emoms.log

3) refresh your web browser and you should see the following error message pop up

Invalid Connection Pool. ERROR = ORA-28000: the account is locked

4) as the oracle user, login as sysdba

sqlplus / as sysdba

5) unlock the account

alter user sysman account unlock;

6) set a new password (don’t do this on production unless you have to)

alter user sysman identified by 'YOUR_NEW_PASSWORD';

7) now go to your command prompt and type

emctl setpasswd dbconsole

8) when it asks for your password, enter your new password

Please enter new repository password: YOUR_NEW_PASSWORD

9) close your web browser, open it and head to your em link

example.com:1160/em/console

10) enter following

User: sysman
Password: YOUR_NEW_PASSWORD

Howto: Resolve Centos 6 and Windows Share Error – CIFS VFS: cifs_mount failed w/return code = -22

Posted on August 6, 2012

When trying to mount a windows fileshare on centos 6.

[jared@localhost ~]$ sudo mount -t cifs //192.168.1.101/share /tmp/share
mount: wrong fs type, bad option, bad superblock on //192.168.1.101/Corpshare,
       missing codepage or helper program, or other error
       (for several filesystems (e.g. nfs, cifs) you might
       need a /sbin/mount.<type> helper program)
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

Tail dmesg and you will find the following error.

[jared@localhost ~]$ sudo dmesg | tail
Slow work thread pool: Ready
CIFS VFS: cifs_mount failed w/return code = -22

Install cifs-utils

[jared@localhost ~]$ sudo yum install cifs-utils

Try mounting it again

[jared@localhost ~]$ sudo mount -t cifs -o username=YOUR_USERNAME,password=YOUR_PASSWORD //192.168.1.101/share /tmp/share 
mount.cifs kernel mount options: ip=192.168.1.101,unc=\\192.168.1.101\share,,ver=1,user=YOUR_USERNAME,pass=********
[jared@localhost ~]$ cd /tmp/share
Older Posts