Search This Blog

Tuesday, September 13, 2011

iptables firewall commands


#to allow access to server with iptables
iptables -A INPUT -s 192.111.111.111 -j ACCEPT
service iptables save

#tp remove access to server with iptables
iptables -A INPUT -s 192.111.111.111 -j DROP
service iptables save


//to list properties of iptables and show allowed ip is added
iptables -L

Friday, September 2, 2011

Mantis and mysql

modifying mantis user data from command line

1. find the mantis config file    
locate config_inc.php

2. connect to the db
mysql -u username -h hostname -p


3. switch to the mantis database
use mantisdb;

4. locate the table that holds users.
show tables;

5. check table content.
select * from mantis_user_table;


6. do what ever you want to a user!
update!!!! update!!! update!!!

mantis with ldap


$g_roadmap_view_threshold = 50;

# --- Database Configuration ---
$g_hostname      = "localhost";
$g_db_username   = "mantis";
$g_db_password   = "dont know";
$g_database_name = "mantis_db";
$g_db_type       = "mysql";

# --- Anonymous Access / Signup ---
$g_allow_signup                         = OFF;
$g_allow_anonymous_login        = OFF;
$g_anonymous_account            = OFF;

# --- LDAP Access / Sign-in ---
$g_login_method = LDAP;
$g_ldap_server = 'ldap://10.1.10.30';
$g_ldap_root_dn = 'ou=Users,ou=my company name,dc=mydomain,dc=com';
$g_ldap_bind_dn = 'mydomain\admin';
$g_ldap_bind_passwd = 'nottellingyou';
$g_use_ldap_email = ON;
$g_ldap_protocol_version = 3;
$g_ldap_uid_field= 'sAMAccountName';

Thursday, September 1, 2011

reset Mac os admin account without boot disk

  1.  Reboot the machine.
  2. Hold command + s 
  3. Time to get to command line as root and type the following command---->
    mount -uw /
    rm /var/db/.AppleSetupDone
    shutdown -h now