Linux Networking question

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.

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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.

kiwi35Author Commented:
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...



Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
kiwi35Author Commented:
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,
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux Networking

From novice to tech pro — start learning today.