We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now


Linux Networking question

kiwi35 asked
Medium Priority
Last Modified: 2010-03-18
Hi !

For my university I need to setup a single Linux server for
email accounts. I don't need to have telnet or ftp accounts,
only email...

So what I need is : to add some user login and password into
a db (or gdbm file) to add news users for sendmail (this is
easy : I already done that.) and find a modified version of
a pop server to look at the db file for user accounts/password, not the /etc/passwd file.

Watch Question

I have looked around a little for pop servers myself, and all the implementations I have seen have used account info from /etc/passwd. You could simply add user accounts to /etc/passwd, as you would normally, and change the shell for these users to /bin/true. This would prevent them from logging in, and as long as /bin/true is not listed in /etc/shells, they will be unable to use ftp access also. The ftpusers file can also be used to block ftp access.

Between this and sendmails /etc/aliases file, you should be able to do whatever you like with mail, while retaining security.


Yes, This like I use now, but to modify the /etc/passwd you must be root (or suid)... Because I don't want any root access on this machine when add/deleting users.

Also the machine will be a mail hub, so ftp access isn't a good idea since I don't want any additions to /etc/passwd...

Also I need speeeeeed : I have about 1000 users (in the next three month about 5000 users [not only univesity students]) so the main idea is use a fast database access..

The best idea of db/dbm file is :

  - you don't need to be root to modify it... For exeample
    a user staff or mailstaff can add / delete thoses mails
    account without root access...
  - db/dbm are fast access database... Since my database is going
    to be more and more big I need speed... (yes I know i can
    buy a new machine but I don't have any funds yet !)
  - there also a security issue since the accounts are not in
    /etc/passwd there is no way some user can log into this
  - I can managa also virtual domains better..

Also, the NIS solution is not good : NIS server down = no mail and NIS lookup are too slow...

The way I would set this up would take alittle bit of time and thought but here goes. Write some code similar to .htaccess file and set up a seperate password file. You will need to hack some of the kernel code to do this. After you have done this then you would set up some non-priveleged scripts to add users to this file.

After the user is added to the file this could then point to the mail functions you require.

The coding and kernel hacking for this would be quite extensive and unless you have the expertise yourself I would recommend getting a qualified programmer to do the code and kernel changes for you.

I haven't the time to write the code and the question would need  to be substantially more well rewarded for someone to do this. Try it yourself or get an expert to do it but I feel this woul;d be the only way that you will get what you require...



Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts


The solution proposed is mainly to change /etc/passwd to /usr/local/mail/passwd...

The main problem is the user/passwd are in text mode and has lots of problems :

 - it is slow... Imagine a lookup on 20000 users...
 - it is really unworkable, when you add or remove a user
   it can takes hours to find the correct login,
 - it is impossible to modify this database quickly (for example
   without shuting down the mail server...)

Then I don't see why I must hacking the kernel to solve this problem... Only the popper's sources should be enougth, isn't it ?

I can give the idea that I want to have all my user/passwd in a SQL server on the mail server... (it is fast and we don't need to have root access to add new data...).

The main idea of this project is : all user/passwd will be on one centralized database that don't depend of the Operating System !

The solution just moves the problem to another place but don't solve it... Remenber I need speed !!!!!! and only a db/dbm/gdbm file can give such speed !

Thanks again,
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.