Open-AudIT
https://www.open-audit.org/phpBB3/

Unable to login to open-audit
https://www.open-audit.org/phpBB3/viewtopic.php?f=20&t=6134
Page 1 of 1

Author:  suhailcheroor [ Sat Jun 29, 2013 3:37 pm ]
Post subject:  Unable to login to open-audit

Hi,

I am unable to login to open-audit after configuring it in ubuntu 12.10. It is showing some errors. I attached the screen shot with this. I followed the below shown configuration.

#!/bin/bash

# The following installation has been tested on:
# Ubuntu 12.04 and 13.04 and Debian 7

# The below commands should be run as the root user.

# Make sure your server is patched and up to date.
# On Ubuntu and Debian
apt-get update
apt-get dist-upgrade -q -y

HOSTNAME=`uname -n`
TIMEZONE=`cat /etc/timezone`
IP_ADDRESS=`ifconfig | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0.1'`

# Install the various prerequisite packages.
# On Ubuntu and Debian
DEBIAN_FRONTEND=noninteractive apt-get install -q -y mysql-server
apt-get install -q -y apache2 openssh-server php5 php5-ldap php5-mbstring php5-mcrypt php5-mysql php5-snmp nmap snmp zip

# Edit the php config file
# On Ubuntu and Debian
sed -i -e 's/memory_limit/;memory_limit/g' /etc/php5/apache2/php.ini
echo "memory_limit = 512M" >> /etc/php5/apache2/php.ini
sed -i -e 's/max_execution_time/;max_execution_time/g' /etc/php5/apache2/php.ini
echo "max_execution_time = 300" >> /etc/php5/apache2/php.ini
sed -i -e 's/max_input_time/;max_input_time/g' /etc/php5/apache2/php.ini
echo "max_input_time = 600" >> /etc/php5/apache2/php.ini
sed -i -e 's/error_reporting/;error_reporting/g' /etc/php5/apache2/php.ini
echo "error_reporting = E_ALL" >> /etc/php5/apache2/php.ini
sed -i -e 's/display_errors/;display_errors/g' /etc/php5/apache2/php.ini
echo "display_errors = On" >> /etc/php5/apache2/php.ini
sed -i -e 's/upload_max_filesize/;upload_max_filesize/g' /etc/php5/apache2/php.ini
echo "upload_max_filesize = 10M" >> /etc/php5/apache2/php.ini
# Get a valid dat/time string from http://www.php.net/manual/en/timezones.php
sed -i -e 's/date.timezone/;date.timezone/g' /etc/php.ini
echo "date.timezone = $TIMEZONE" >> /etc/php.ini

# Set the server name for apache
# On Ubuntu and Debian
echo "ServerName $HOSTNAME" >> /etc/apache2/apache2.conf
service apache2 restart

# Create the install directory.
mkdir /usr/local/open-audit

# Copy your extracted package files to it.
cp -r * /usr/local/open-audit/

# Set the appropriate permissions on the install directory.
# On Ubuntu and Debian
chown -R root:www-data /usr/local/open-audit

# Set the appropriate permissions on the install directory.
chmod -R 770 /usr/local/open-audit
chmod -R 770 /usr/local/open-audit/code_igniter/application/views/lang/
chmod 770 /usr/local/open-audit/install_debian_ubuntu.sh
chmod 770 /usr/local/open-audit/install_centos_redhat.sh
chmod 770 /usr/local/open-audit/other/audit_subnet.sh
chmod 660 /usr/local/open-audit/other/open-audit.log
chmod 770 /usr/local/open-audit/other/winexe

# Set the required permissions.
# On Ubuntu and Debian
cp -r /usr/local/open-audit/www/* /var/www/
chown -R root:www-data /var/www
chmod -R 755 /var/www

# Remove the uneeded index.html file.
# On Ubuntu and Debian
rm /var/www/index.html

# set the suid for /usr/bin/nmap.
chmod u+s /usr/bin/nmap

# Set the MySQL root user password.
mysql -u root -e "USE mysql; UPDATE user set Password = password('openauditrootuserpassword') WHERE User = 'root'; FLUSH PRIVILEGES;"

# Create the Open-AudIT database.
mysql -u root -popenauditrootuserpassword -e "CREATE DATABASE openaudit;"

# Create the application user for the database.
mysql -u root -popenauditrootuserpassword -e "CREATE USER openaudit@localhost IDENTIFIED BY 'openauditpassword';"
mysql -u root -popenauditrootuserpassword -e "GRANT ALL PRIVILEGES ON openaudit.* TO openaudit@localhost IDENTIFIED BY 'openauditpassword';"
mysql -u root -popenauditrootuserpassword -e "FLUSH PRIVILEGES;"

# Insert the database schema.
mysql -u root -popenauditrootuserpassword openaudit < /usr/local/open-audit/other/openaudit_mysql.sql

echo "Installation complete."
# Open a web browser and go to
# http://<YOUR_SERVER_NAME>/index.php
echo "Try browsing to http://$IP_ADDRESS/index.php"
# You should be able to log in using user:admin and password:password.
# Change the Admin user password by going to Admin -> List Users -> Edit User.
# Enable some Reports by going to Admin -> Reports -> Activate Report.
# Enable some Groups by going to Admin -> Groups -> Activate Group.
# NOTES -
# If you wish to change the MySQL user and password, the application config file is at /usr/local/open-audit/code_igniter/application/config/database.php
# We have to disable SE Linux on CentOS / RedHat because it prevents apache from running the audit subnet script.
# You can tune php.ini to your liking. You may not wish to show errors, but they are useful for debugging and bug reporting.

Attachments:
File comment: The error screen shot is attached...
screenshot.png
screenshot.png [ 48.41 KiB | Viewed 11976 times ]

Author:  jpa [ Sun Jun 30, 2013 1:31 am ]
Post subject:  Re: Unable to login to open-audit

The deprecated mysql_escape_string is useful to know but shouldn't be displayed. I would set display_errors off in /etc/php5/apache2/php.ini and see what output you get.

Author:  Mark [ Mon Jul 01, 2013 10:05 am ]
Post subject:  Re: Unable to login to open-audit

Looks like it's a P{HP 5.4 + CodeIgniter issue.
For now you can apply the patch mentioned here - [url]http://ellislab.com/forums/viewthread/228288[/url]
I'll try to get this into the next release.

As JPA mentioned, you should be able to disable warnings and it should still work fine. This should not actually stop you from logging in.

Author:  suhailcheroor [ Mon Jul 01, 2013 10:48 pm ]
Post subject:  Re: Unable to login to open-audit

"php5-mbstring " this package is compulsory??????? I am getting an error unable to locate package in ubuntu12.10..

Author:  jpa [ Tue Jul 02, 2013 4:05 am ]
Post subject:  Re: Unable to login to open-audit

mbstring is necessary but since you can't find the package maybe it's already compiled in to the version of php you're using. Use [url=http://php.net/manual/en/function.phpinfo.php]phpinfo[/url] to see if it's installed.

Author:  Mark [ Tue Jul 02, 2013 1:16 pm ]
Post subject:  Re: Unable to login to open-audit

[quote="suhailcheroor"]"php5-mbstring " this package is compulsory?
If you want PHP to support UTF8 (languages other than English for example), then yes, it is compulsory.

Author:  suhailcheroor [ Tue Jul 02, 2013 3:42 pm ]
Post subject:  Re: Unable to login to open-audit

I tried installation in an other system,,, That is working fine...
Thank you friendzzzzzzzzzzzz :D
Is there any tutorial for beginners of open-audit?

Author:  Mark [ Tue Jul 02, 2013 4:17 pm ]
Post subject:  Re: Unable to login to open-audit

You can find documentation here - [url]https://community.opmantek.com/display/OA/Home[/url]

Author:  jpa [ Wed Jul 03, 2013 12:35 am ]
Post subject:  Re: Unable to login to open-audit

[quote="Mark"]If you want PHP to support UTF8 (languages other than English for example), then yes, it is compulsory.
I think mbstring is required for any operation. For example I see mb_detect_encoding called in system.php without detecting if it exists.

Page 1 of 1 All times are UTC + 10 hours
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/