Archive for the 'Nginx' Category

Jan 18 2009

htpasswd executable for Nginx running on Debian

Published by under linux,Nginx

You need htpasswd executable for enabling password protection in Nginx webserver. Mod_Auth is a core module of Nginx webserver. But it does not come with a htpasswd equivalent tool. Normally people use the htpasswd provided by Apache webserver. If you have not installed apache then chances are that you dont have these tool. I did not have this tool and my search on the internet did not yeild this executable.

So I am sharing the htpasswd executable that I  built on a Debian 4.1 (X86) machine. If you are unable to execute this  on your platform then you need to build from the source.  You can download Apache 2.2 source from this link, from which I built the htpasswd executable.

To build htpasswd executable.

Download and untar the Apache source.

./configure
make
cd httpd2.2.11/support ( htpasswd is in this directory )

One response so far

Jan 11 2009

Configuring Samba as a Home File-Server

Published by under linux,Nginx

Samba is a very powerful software that can act as File-server & print-server using SMB/CIFS protocol. Here I describe a Home environment  and provide a appropriate Samba server configuration.

Assumptions

Samba is installed correctly and it execute with out issues.
Samba configuration file is located in /etc/samba
Samba Configuration file name is smb.conf ( This is the default )
Samba is installed on Debian Linux distribution. ( This should not matter much )


Description of the Mr Lingsiva’s Home Environment

  • A Linux server with huge disk-space
  • A Mac desktop system
  • A Windows XP desktop
  • Office Laptop that needs to work in both Office and Home environment
  • A DSL Internet from ISP. DSL model Cum wireless router acts as the firewall for Home Network
  • All these computers form a private network behind the firewall and Wifi security is enabled for wireless connections.

Samba File Server Requirements

  • A common folder accessible to all home computers and office laptop while operating under home profile.
  • A private folder for each of the family members
  • The common folder should be available only for the trusted systems. That is,
    the systems I identify as trusted. For example, if one of my friend
    visits my house and plugs his computer in my network, the common folder
    should not be accessible from his computer.
  • Private folder of User A should not be accessible by User B
  • Samba service is only available with in the private network and must not be accessible from the Internet.

Links to Refer

http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/passdb.html
http://oreilly.com/catalog/samba/chapter/book/index.html

smb.conf File That Satisfies The Above Requirements

[global]
netbios name = squad
server string = Siva’s File Server
invalid users = backup,bin,daemon,games,gnats,irc,list,lp,mail,man,news,proxy,root,sshd,sync,
sys,uucp
workgroup = HOME
os level = 34
valid users = @users
security=user

[common]
browseable = yes
comment = Common folder for family members
path = /path/to/directory
writeable = yes
force group = users
create mode = 770
directory mode = 770
[homes]
browseable = no
read only = no

Comments Off on Configuring Samba as a Home File-Server