PHP require_once() warning with hook_menu
If you look a bit closer at the path in the error message:


  /var/www/html/drupal/modules/system/demo_usernames_form.inc


You'll notice it's trying to find your include file in the system module.

It's happening because the user module's implementation of hook_menu() has this in it:

$items ['admin/config/people'] = array(
  'title' =&gt; 'People',
  'description' =&gt; 'Configure user accounts.',
  'position' =&gt; 'left',
  'weight' =&gt; -20,
  'page callback' =&gt; 'system_admin_menu_block_page',
  'access arguments' =&gt; array('access administration pages'),
  'file' =&gt; 'system.admin.inc',
  'file path' =&gt; drupal_get_path('module', 'system'),
);


Notice the file path at the bottom, explicitly setting the path Drupal should look for the included file in. 

Since properties are inherited from parent paths, and the path of your item sits nicely under that one, you get an implicit file path that you weren't expecting. The result: your module path is no longer consulted when the system tries to find the include file.

To fix, just add the correct file path to your hook_menu() code:

$items['admin/config/people/usernames']=array(
  'title'=&gt;'bad usernames list',
  'description'=&gt;t('configure not allowed usernames'),
  'page_callback'=&gt;'drupal_get_form',
  'page arguments'=&gt;array('demo_usernames_form'),
  'access arguments'=&gt;array('administer site configuration'),
  'file'=&gt;'demo_usernames_form.inc',
  'file path' =&gt; drupal_get_path('module', 'demo'),
);


And flush them caches.