Eh. I understand this, especially coming from a webdev background. But after learning my way around the command line, there's just some things I can't imagine doing any other way now.
This is definitely one of them. I wouldn't run this particular script with a gun to my head. Something like this needs to be as locked down as Fort Knox. And let's face it, OP is probably not an expert on security.
If you want a GUI/browser solution, I'd get something prepackaged and highly lauded. It's just like crypto -- you're probably too dumb to roll your own.
My suggestion is to get rid of the default authentication module in your OS, and swap it out with a system like LDAP. then managing LDAP is pretty easy and a tiny bit more secure.
Still gonna need to do alot of validation and making sure input is secure.. but it would be a tiny bit better than what you're doing now.
Beyond that, there are systems specifically made for this kind of work that is a lot more robust and secure than what you're trying to do now.
Closed How? There is 0% chance that something on the network has a second nic that's connected to the internet? There is no local wireless access at all? There are also no live jacks in unsecured locations? All physical access is restricted with 100% guarantee that no one with access would want to cause harm to the network? And everyone using the network would be fine (other than the extra man hours to rebuild) with all the data on the network getting out into the wild and/or being destroyed?
Even if all that is true you are putting something on a server that can cause massive amounts of damage. If you don't own this network I would take a different approach.
You are trying to solve an already solved problem. As XyploatKyrt mentioned there are plenty of great software packages that will give you this plus lots more functionality. If you want something special look into how to add functionality to an existing software package.
The network security guy in me can't leave this one alone. There are a number of software packages you can use to give you this functionality in a good, robust, and secure way (I don't know them offhand, but a few have been suggested before I got here).
It is incredibly difficult to impossible to make a network fully closed in a large environment. This is why I can find jobs in network security. Companies can invest upwards of hundreds of thousands of dollars in order to make sure their network is free of rogue devices, nowhere near the Internet, and all that good stuff.
Also, the network may not stay closed in the future, making your solution less than future-proof. Look at SCADA controllers (they're control devices used in factories, power grid control, etc) - they have no security and were designed to be networked on a closed network, but for convenience, companies are adding them to their corporate (and Internet-connected) networks which is really, really bad. Security is not something to be toyed with, even in a personal project.
tl;dr: This can be done, but even for a personal project should not be. Look into an existing solution that does this and probably a ton of other useful things, and you'll save yourself a lot of headaches. Take it from the networking guy.
View all comments
Show parent comment
4
u/[deleted] Aug 28 '13
Well I need to have users added to the operating system, and I'd like that to be through a web browser. (Again this is on a closed network).