Linux in a Business - Got Root?
greenBeard asks: "I work for a government contractor, and have recently convinced them to purchase a Beowulf cluster, and start moving their numeric modelers from Sun to Linux. Like most historically UNIX shops, they don't allow users even low-level SUDO access, to do silly things like change file permissions or ownerships, in a tracked environment. I am an ex-*NIX admin myself ,so I understand their perspective and wish to keep control over the environment, but as a user, I'm frustrated by having to frequently call the help-desk just to get a file ownership changed or a specific package installed. If you're an admin, do you allow your users basic SUDO rights like chmod, cp, mv, etc (assuming all SUDO commands are logged to a remote system)? If no, why don't you? If you allow root access to your knowledgeable users (ie developers with Linux experience), what do you do to keep them 'in line'?"
Twitter.com/TrentonHyatt
Because if you allow someone chmod permissions, for example, all they need to do is something like "chmod 777 /etc" and you're system security is screwed.
I usually write kernal modules that nerf certain permissions.
This way, users can do what they like, but they can't fsck anything up.
Failing that, I reckon a big man with a large knife could probably go a long way to keeping them in line.
Me failed English...
FreeBSD over Linux. If my comments seem odd, this may explain...
Much as I hate to break it to you - this is SoP.
End users Do. Not. Get. Root. Even allowing SUDO access to change file permissions, copy, or even move files is just asking for trouble.
Installing software or libraries? Hell no. Not on a live system.
If they have a development-type machine at there desk, that's one thing (just don't call for support if you break the damned thing). Even then, my preference is that they have limited access.
On large, shared systems, users get as much, and as little, access to do their jobs as necessary, and absolutely no more than that. I have to keep the system up for other users, I can't have power-user #1 screwing things up by changing permissions on something they really shouldn't be touching (let's take the compiler for example...)
A little knowledge makes one dangerous, and I'd just as soon noone other than those paid to admin the machines have access.
Ever heard of setuid root?
ACL's are quite nice and so are different levels of security.
http://saveie6.com/
We usually just tie them to their chairs with duct tape. That way we always know where they are, and what they've done (the video cameras help).
IMHO, this will depend on the environment you are running. If you have some development servers, your users are most likely to be developers, who will require full (or close to full) access to the servers. In your staging environment you may want to start logging all the commands, and provide only limited sudo access. In your production environment - why would you have users in the first place?
Do you fall under the scope of the Sarbanes-Oxley act? By not allowing sudo or plain 'ol root access, accountability goes way up if you have to call the help-desk to perform whatever action you need to take. You have effectively limited the scope of those who can make changes to the system and presumably the changes that are made are logged.
Sarbanes and Oxley. I don't know you, you don't need that access, we have a process in place and I am not signing off on you. Follow the procedure or go somewhere else to work.
Strange women lying in ponds distributing swords is no basis for a system of government.
And even allowing chmod, mv, etc via sudo can be dangerous. Someone accidentally issuing a "sudo chmod 777 -R / ", having meant to type "./" for everything below their current directory, isn't going to be good for your system health and is going to be somewhat of a pain to recover from, even if you do know who screwed things up.
OK, here's my cynical answer as a UNIX admin: I limit user access because it's one way to keep my position appearing valuable. As long as I'm the guy they have to go to for any system changes, and as long as I can tell the PHB's I'm monitoring their activity, my job sticks around.
All's true that is mistrusted
You are going to get a bunch of responses. most of them from people that will say something like.. "NO." "NOBODY GETS ROOT, PERIOD".
Well, in an ideal world, it would be that way. We would setup systems for people to use and they could just use them without root privledge. Unfortunatley we know that isn't possible if you want your users to actually be productive and get things done.
I work for a large software company. Trust me you'd know the name of it if I could tell you. We use linux on the desktop, as well as the servers. We also have some Microsoft servers that are either for legacy purposes (havent been updated yet) or for testing applications against MS environments. Anyway...
All my users have laptops with Linux on it. They all have the root password to their individual laptops. Many of the also have a server at their desk for their own testing purposes. They have root to that.
However, the "real" servers that are accessed by someone that isn't themselves, the users do not get the root password, ever.
I look at it this way. If you bomb your laptop or your test server, either you can fix it, or you can call me and I'll walk you through fixing it, fix it, or just give you a new clean configuration.
If you bomb my server, I'm going to make sure you never have access to anything, ever.
Don't Tread on Me
xen is the king. ( http://www.cl.cam.ac.uk/Research/SRG/netos/xen/ ) Many ISP who prowide virtual hosting provide you a xen machine instead - you have a full root access in a chmod jail, they have several VMs w/o perf penalty. Not your case though...
Have them share a group? They can always share files by allowing complete group permissions, can they not? If that is all they want to do.
Any guest worker system is indistinguishable from indentured servitude.
The next time that server blows up and needs to be replaced, or we simply decide we need to add another one, building it is my problem, not those developers'. And it's a whole lot more problematic if I don't know all of what was done to get it into its current state.
Of course, that really just goes back to the fact that you should never do anything adminnish directly on a single server, ever. Your configuration management tool should do it for you, so it will also know to do it to the next one.
Some of the systems I work on (high end compute clusters used by hundreds of researchers around the country) are very very restrictive. Do whatever you want inside your ~, but nothing outside. Why would someone need to change the permissions on a dir in /usr? /lib? It's a live system, and clusters need to stay up :-)
Need some software installed? Hell yeah - call support. Want to make it less frustrating for users? Have really really good support people (person), who knows the system VERY VERY WELL.
If you let developers change anything at all on a machine, change control goes out the window. When they deliver their product and piss off to a better paying job elsewhere you have no way to reproduce whatever weird arse thing they did to get their software to run.
Keep root away from developers and other users. Always. Never ever give in. Relax your guard and you will be bitten!
Oh wait. Okay, everybody can groan now.
Seriously, people should have the minimum permissions necessary to do their day-to-day jobs.
When it comes to things they might need to do occasionally, you have to decide is it worth the risk to give them that level of permission.
One way that might work is allow "sudo for a day" with management approval. If a person needed to do more than one thing in a day (or hour, or week) that needed extra privilages, have his manager and the IT manager sign off on it and give him those extra privilages for that time period. In some cases, this might mean adding him to the sudoers list.
If it's just a single task, like install a package, might as well have IT staff do it since it'll be just as much work to get management approval.
Knowledge is how to play a game, intelligence is how to win, wisdom is knowing what game to play.
.... we run a SOA enviroment with about 50 different apps on many machines. We run each app under a seperate uid. App developers are in a group named for the app and members of that group are given full sudo permissions for the app uid. Creative use of /tmp and cp have eliminating most of the chown requests. Only issue is for those few developer's than need to work on more apps the the 32 group limit allows. They have to suffer with the newgrp command.
Developers with Linux experience are a LOT more dangerous than developers without linux experience. My experience has been (100% of the time) when I give "experienced developers" access to commands like 'chmod', I find all kinds of files mode 777 (among a list of about 10,000 random, stupid things developers do) because, well, I've heard pretty much every excuse you can imagine.
The problem is that as soon as people outside of the core sysadmin team have access to critical system commands (cp, chown, chmod) the integrity of the box is left to chance. There's always the possibility someone is going to do something outside the policy. Sysadmins make it their job to know and understand the impact of every change to a box. Developers tend to make changes in order to get their stuff to work, regardless of the consequence (hey, each group is just trying to do their job, which is "make it work!!" -- I'm not defending either side).
My rule of thumb:
- Developers get root in their dev environments.
- Sysadmins get root in the production environments (developers shouldn't even have user-level logins to these machines.) If your company is releasing software (even for internal use) properly, the IT group will be managing the code as a product, using developers as a help desk rather than letting them manage the applications directly.
Stick to this and everyone will be happy.
-- People who hate Windows use Linux. People who love UNIX use BSD.
To suggest that you install a rootkit on the computer you need to use.
As for keeping them 'in line' once they have root access... I recommend a pointy stick.
Umm... or training. Even knowledgeable users can accidentally forget to reset permissions up and since you're a gov't contractor, you have to be more careful about data security. Right?
[Fuck Beta]
o0t!
If you don't do them right, users can exploit the IFS and PATH envvals to subvert your setuid wrapper program.
I come from the other side of the fence. I am a developer of multiplayer servers. For my part, I couldn't do my job without root access. I need to do things like set the date and time on the machines, install to /bin, upgrade compilers, etc. If I had to ask the helpdesk every time I needed root, they'd just set up right outside my cube.
On my Windoze machine, OTOH, I have no need for system level permissions, and I don't ask for them. I can install software, but so can all the other developers (and, I think, anyone in the company). All I use that machine for is e-mail and testing client connectivity to my servers, when I'm not using my Linux test client.
Some people need root and some don't. Don't make blanket policies unless you're prepared to make exceptions. Oh, and, for everyone's sake, if you do restrict access, please, please make sure that at least one person who can change things is available 24/7. I can guarantee you that Peterson up in Accounting is going to have a system crash that requires help when trying to get the year-end reports out at 2:30 A.M. before the big board meeting at 9:00.
... I'm special and rules don't apply to me.
How can I convince others of this?
The surprise isn't how often we make bad choices; the surprise is how seldom they defeat us.
Just hack the code, Neo.
It is best to have one and only one person with root access, even if your users are knowledgeable and honest. This eliminates the chance that two or more users could make changes to the system that, together, compromise its security or stability. Also, if something goes wrong, it's alot easier to know who did it (!) and what needs to be done to fix it.
If it weren't for deadlines, nothing would be late.
Even the smart ones. Sure, give the users some stand alone development machines with root access but don' let them fuck up the cluster/servers. A lot of users are focused on their job but they don't always see how their actions on shared equipment will impact the company or entity at large. /tech support at large lab, full of brilliant idiots.
I drank what? -- Socrates
because "it was an accident" does not cut it when a production server goes down. They getting fired or not because it was logged does not help the fact they hosed a server that needs to be running.
30% off web hosting. Coupon code "SLASHDOT".
This sounds to me kind of like the situation in a university Unix network. I'm not entirely sure I understand what you necessarily need that wouldn't be available (though I would like to know, to get a better understanding of the question). Certainly, at the university I attended, we didn't have sudo access, but we were able to develop some rather powerful applications.
/usr/local/whatever, and tell them how to set up their LD_LIBRARY_PATH to link against it, and they're good to go.
I can see an adjustment period of a couple of months, where applications you regularly use aren't available, so you ask for them to be installed. After that, assuming they don't see the general need for an application (or they don't want to have to officially support it), you could theoretically install applications under your home directory. (I was thrilled when I became a grad student, and got 100MB of disk quota, so I could compile and run Blackbox as my window manager instead of the crappy twm we were generally stuck with. In fact, I made it globally executable, so my friends could use it as their window manager. In fact, I received a phonecall once from one of the admins, asking me what this spinning "blackbox" process was running on one of undergrad servers, since I was the only grad student or professor (and therefore in the phone directory) who also ran it.)
These days, as part of my regular job, I am one of the unofficial sysadmins of a Beowulf cluster (largely because I'm the one of the only ones who have developed MPI applications that run on it). I get the odd request from other users who want me to hook them up with some library or such. I compile and install it under
Again, I have to ask what you need that requires root or sudo access, that can't be solved by the rare admin call or installing under $HOME. (I really don't mean this in an insulting way. I do want to know. The story post is a little brief.)
Ah, that's a classic one. Brilliantly simple. We had a server go down when somebody accidentally typed it into the wrong terminal while trying to test the ulimits on their local machine. Oh, we all had a jolly good laugh about it afterwards of course.
Santa's suicide mission go!
It's a given that your "must have root to do this" list is finite, but is it "smallish" and something that can be predicted in advance?
I ask because if you only need to do a few dozen things over and over again, the admins could configure the system so you could do your work without root.
On the other hand, if your "must be root" tasks are new every day then you might as well be a system administrator. Just be sure you keep the real sysadmins up to date with any changes you make. Change control is important you know.
Knowledge is how to play a game, intelligence is how to win, wisdom is knowing what game to play.
I work for a government contractor, and have recently convinced them to purchase a Beowulf cluster, and start moving their numeric modelers from Sun to Linux.
,so I understand their perspective and wish to keep control over the environment, but as a user, I'm frustrated by having to frequently call the help-desk just to get a file ownership changed or a specific package installed.
Congrats!
Like most historically UNIX shops, they don't allow users even low-level SUDO access, to do silly things like change file permissions or ownerships, in a tracked environment. I am an ex-*NIX admin myself
Good, Good!
If you're an admin, do you allow your users basic SUDO rights like chmod, cp, mv, etc (assuming all SUDO commands are logged to a remote system)?
Hell No!
If no, why don't you?
Because it is my responsibility, and my responsibility alone, to keep those machines running. If you screw up the system, then I will have to work later and possibly come in on the weekend to fix it. This is not something I am willing to risk.
In addition, as an ex-*NIX Administrator, you should know that the best way to keep a secure system is to give the least privs possible.
Can I get an eye poke?
Dog House Forum
(Disclosure: I work for Sun and work with Linux since 1994).
Why would you move the modelers to Linux from Solaris? There is no real advantage....
Sure a Beowulf cluster is a nice piece of hardware, but hardware can only compensate a bit for programmer productivity... If their code is written using MPI or OpenMP or some other standard clustering environment then there shouldn't be a need to move the developers, should there? Just recompile and go.
It is really much more efficient to shove faster hardware under a programmer then to force the programmer to adapt to a different programming environment. Programming for a cluster is hard enough without having to take into account the details of the operating system, forcing them from Solaris to Linux might improve the execution part (on a side note, have you considered Sun's clustering tools?). But it *will* set them back in productivity while they move to different compilers and adapt the execution of the program to the Beowulf environment.
In my opinion you have forced your customer to make a move on questionable grounds.
Now to the matter of security. As you are aware, Solaris has the highest level rating for security. Secure Solaris is the defacto operating system at a number of government agencies. Linux cannot hold a candle to the multiple access levels of the Secure Solaris operating system. You state that you are frustrated at needing the helpdesk for file permission changes. What is your point? Are you using the fact that YOU don't like the limitations to change a customer from Solaris to Linux? Or are you complaining that the customer's environment did not deploy secure solaris with its multiple access layers? In Secure Solaris there is no need to muck with sudo. Each file can be managed properly from a security point of view (come to think of it, much of that can be done with Linux too).
Before I answer your question, let me state that I understand your point of view. When I joined the navy as a UNIX project manager, the admins gave me absolutely no rights whatsoever on the production systems. Their reasoning: '.. he can do things I don't understand, can't control or prevent.' There will always be a tension between the lockdown desired by the admins to keep their environment safe and secure and the users who want total freedom....
In my mind there is NO good reason to give ANY user root access in a secure environment. Period. If you have frustrated in the past by having to interface with the helpdesk, then the helpdesk needs to be improved. At the same time, I assume, any user has full access to their files.
You mention that you have convinced modelers to move to a Beowulf environment, then why the issue anyway. If they run cluster code then they run as user. All the need are basic user access rights, nothing more...
Maybe I don't understand your point....
Why you ask? Because i find end users in particular believe their capabilities are such that they could re-write the whole OS, even though they have trouble typing things in a word processor. That, and i dont trust them, people are inquisitive, they like to search around, and inevitably, manage to find a way to screw things up. Giving that sort of access is a bad idea, let alone putting it into practice. That just opens up a Pandora's box of late nights trying to fix the fsck'd system.
I have always had this ability (in several of the largest companies in the US) but I have always started the conversation with an acknowledgment that the sysadmins are ultimately responsible for the network. Then, we focus on what functions I may need to do, how I avoid causing a problem beyond my own work, and how we can establish a regimen where I report what I have touched and where they are able to monitor to ensure that I have do only that.
This has never been a problem. Then again, they already know, prior to that, that they would be in bigger trouble if I were not trustworthy. I offer them more controls than they would have insisted on and this gets me more latitude than they normally would have offerred.
I also work for a defense contractor and adhere to strict security rules. We have a fairly simple means of controlling our developers who need root access. We buy their systems using their bosses' overhead or project charge numbers, place them on a monitored, isolated subnet and, when they hose the system, all time expenditures are billed to one of the previously mentioned charge numbers. At my billing rate, it doesn't take too many incidents for them to feel serious heat or be canned. Either way, they do not touch production machines or cause problems that cannot be quickly isolated by disconnecting the subnet.
It works for us.
If you're at a defense contractor, they're probably following the DoD Guidelines of least privelege, logging, stuff of that nature.
What you're asking is, essentially, to establish yourself as a certain class of user under whatever scheme you're using, or for some kind of "well, Slashdot agrees" circumvention of guidelines.
It reminds me of a time that I was working on such a machine, and I sat in a conference room where people were trying to bargain with me as if I represent the STIG. The simple fact of the matter is, the STIG is a set of guidelines, and nobody's opinion will change the contents of the document.
Stop trying to negotiate it.
These days security is an issue. But with a compute cluster I'll bet I could come up with a setup where moderate errors wouldn't compromise the rest of the network. A compute cluster is easier because people won't be running browsers on it or reading their email there. That eliminates most of the user-caused problems. So at that point a tight firewall may be enough. On a small research machine used by one research project you're not really trying to protect users from each other. So many of the traditional concerns about protection don't apply.
There are only a couple of situations I've run into where I've needed more, such as applications that need to bind to a priviledged port, or where I've needed to run a cron job that needed more than 1024 file descriptors and so had to make it setuid root. (Setting the number of file descriptors up for a user via /etc/security/limits.conf doesn't apply to that user's cron jobs).
With Solaris 10 you get so much fine-control over security that you can kick sudo out of the window and use Solaris's built-in tools. Dude, your move to Linux is going to bite you in the arse!
A sandbox, where the developer can play to his heart's content, doing whatever he wants. He breaks it? He fixes it, or it gets nuked and reinstalled.
A test environment, where every change is logged and monitored. Nothing goes through without being authorised and signed off. The sysadmin is informed of every change, and is allowed to nix a change, for whatever reason; if the developer insists, the sysadmin and the developer sit down to talk about what is being done and why, and why the sysadmin is balking.
A production environment, where every change is logged and monitored. Nothing goes through without having been through test first, nor without the change actually having been tested to a fare thee well.
Allowing any random person the right to chmod, cp, mv, or whatever any files as root is a recipe for massive instability and security problems. Don't do it, unless it's in a sandbox.
Solaris seems to be faster than Linux these days, and runs on swanky new Sun Fire T2000 servers. Whether you run Linux or Solaris, file permissions are always an issue. Get used to it.
Zen tips: Pay attention. Don't take it personally. Believe nothing.
I'm a Unix Sysadmin (HP-UX, AIX, Tru64, Solaris) who works with a team of Unix admins to handle user requests. I've seen several replies about "not even with sudo access to " but they aren't accurate.
Sudo can be set up to allow a restricted set of commands. Yes it's a pain to give them specific permission to chmod specific directories. Yes it's a pain to set sudo up so that it not only gives fine grained permissions, but also has fine grained denials. This is the power of sudo, and if it's set up properly can be very helpful in reducing some of the work load the admins would be asked to do in a safe manner. Throw logging into the mix, and you can prove WHO ran the command that broke their toy, which is important when someone wants to point fingers. Sudo isn't perfect, and the users shouldn't be given rights to do certain things, but for basic tasks (allow a web developer to reboot the web server on the development box, for instance) it's a blessing.
And only give them the tools they really need to develop, test and debug their programs.
Bottom line is only one single group/user should have full access permissions. Keeping you sandbox is both a blessing and curse. Truat me when I say that the stress level is Much Less when you have only user level access permissions. Enjoy your day and thank the sys. admin when you see him.
What's wrong with keeping Sun and running Linux on that hardware?
Another question: What's wrong with Solaris?
Direct away from face when opening.
I've been both a developer and an administrator.
/usr. root access as we know it is a luxury that should be reserved for true administrative duties, unless absolutely positively necessary.
As a general policy, if a developer needs root access, they need to prove to me as an administrator that they actually do need root access. I'm not going to give root access (sudo, su -, or access to privileged accounts), even on a development box, to someone that needs occasional chmod privileges. More often than not, the people who are begging for root access are those that have been so spoiled by coding on their own Linux boxes that they lose sight of all the best practices that contribute to good code. They want foolish things like directories with 777 privileges so they can drop temp files when there are 30 better ways to do it. root is not a cure all... just because you're used to it on your own machine doesn't mean it's appropriate for coding in a multi-user environment developing customer-facing applications.
In the end, there are very few specialized applications that actually require root access to work. I will concede that sometimes root access is necessary but it needs to be treated on a case-by-case basis. I'm of the belief that a properly written application should be written such that it can be run with the least amount of privileges, and can be installed anywhere... not just
Another sysadmin who is going to tell you that I don't give out root or sudo access to users. Most users who think they know enough, or even DO know enough, really know enough to make big problems. They invariably never check with me before making a change, or tell me that they made a change, or even admit to having made a change when they inevitably screw something up.
I make them come to me for everything. But not directly. That's what the ticketing system is for. The ticketing system justifies my existence, keeps any requests from slipping through the cracks, and helps to keep track of ad-hoc changes made to any given system.
Many times end users think they need root for something when they don't. For example, there might be some niche tool that they need installed on a system. Or do they? If the one user is the only one that is going to use it, I advise him to do something like "./configure --prefix=~" to build apps to install in his home directory. You don't need root to install apps anymore. Besides, if you want an app installed for everyone to have access to, sysadmin should be doing that anyway.
It might be a pain in the ass to make you go to the sysadmin for everything, but in the long run it will keep things running smoothly and perhaps force you to be a little more disciplined in your work.
I liked it so much, I pwn3d the company!
One variation that I've seen work well is to allow people full access to their own workstations, but not on servers (or clusters in your case).
This limits the types of access people can have on the heavy server machines, but lets them install apps or do whatever they need locally, including installing a different OS or OS variation based on need or preference.
Of course, the more people 'adjust' their workstations the less support you can afford to give them. You also have to be very careful about how much servers trust any information from workstations (NFS can be very tricky to get right), and have to more draconian with your firewalling policies.
Security versus usability is always a balancing act. It just depends on which balance is right for your environment.
plus-good, double-plus-good
If you allow users to chmod, a savvy (enough) user could change permissions on the right stuff (such as the sudoers file) and give himself more access than you may want him to have.
just a thought
Arrrrrrr
A quote from a text book of mine that I think may help: Some users with unix experience, and particularly those experienced in the linux flavor, may find this caution to be peculiar, in that a conciderable amount of third party software seems to end up installed in privileged system directories these days, as so they might have gotten used to needing to be root to do simple installs. This is the worng way to do things, and fortunately it's a rare unix application that will force you to do things in a poorly thought out fashion if you don't want to. Almost all non-OS-vendor software should be installed and owned by a non-root user. Even vendor supplied copies of third party applications (such as the Apache web server) are best owned and installed by non-root users. This model makes life a slight bit more difficult than just having root own everything, but the benefits far outweight the minor inconveniences. If you conscientiously make certain that everything that's not distinctly part of the OS is owned by a nonprivileged user, you can allow nonprivileged users to modify and maintain those parts of the system with no fear that they are going to do damage to the OS itself. The machine is more secure, the workload of managing software can be distributed, and those users who need to modify configurations (such as the web server settings) can do so without having to annoy root, or run the risk of compromising the system by a careless keystroke while operating as root. Implementing this model will take a small additional amount of effort on your part. You won't be able to follow people's simple-minded instructions to "sudo make install" bits of software. But your machine will be better managed and more secure, and you'll be helping to keep mushy-headed thinking from taking hold of the *NIX platform, if you just take the time to follow these suggestions and set up a nonprivileged software account to own and install the majority of your third party software.
Is very important in high availability environments. I find that a lot of times, due to lack of communication, I will change something on a server, and another admin will come along. "Who the heck did this?" And change it back. So I end up spending a good portion of my day doing things a few times. Now, I would implement change management if it were a high availability system. Instead it is just our dev network.
The summary mentions giving users access to commands like chmod, cp etc.
Of course you would give them access to these commands - just in their own little home areas, other areas would be restricted by root permissions.
I see nothing wrong with doing such. If they want to do system level things let them play on a play box.
This policy keeps IT people employeed, builds IT's fiefdom.
Effects on 'customers' and their productivity is irrelevant, doesn't even cross anyone's minds. These are bureaucracies you are dealing with. Think reptile vs advanced mammal when discussing the differences between bureaucracies and even horrible profit-driven organizations.
I worked for the State of California on a contract about 20 years ago. At that time, the PC was just getting off the ground, but PC-users were forbidden to do anything that could be construed as programming, e.g. spreadsheets and databases. They had "computer police" who came around and inspected computers. Woe unto you if you had forbidden applications. Of course, a lot of people therefore worked from home, did all their databases and spreadsheet work there.
Maybe that policy has changed, but if so, it wasn't because IT decided it was a wise way to enhance the state's productivity. More likely, everyone went along with IT because it increased their budgets.
Lew
If a system is set up correctly, developers should not need root privs. If there are sitiuations to the contrary, then they show a bigger problem with how things are structured or problems with the IT group.
Only IT should be able to modify the base install of a system. This includes common libraries, binaries, directories and other things that are on the system when it is rolled out.
Need to install new commands in a common tree? Have some other directory that is added to a common path that privelaged developers are able to install in.
Need to change file permissions? The only time I have seen this needed was log files that got owned by root after rotation. A better thing would be to make the rotation script give files correct permissions to begin with. A user should not need to change permissions on local files.
Need to install new software? If this is a real server and there is no tracked, established procedure for software being upgraded/installed/removed or altered in some way without IT involvement, there are more serious problems with the structure than the software change. There should always be a procedure that is followed with software changes, that should either be done by or with an IT person.
Servers should rarely be touched. Even desktops should rarely change if you expect some level of support from IT. If the IT group is not giving you the level of support for you to easily do what you need to do, the problem is not the lack of sudo, the problem is the lack of procedures and tracking and all the messy parts of IT that go beyond the root priveledges.
I have had to work on both sides of the sudo/root issue before, and I have seen places where giving root to the wrong person has caused more problems than it has solved. In jobs where I haven't had root, but needed it, there were bigger problems about how software was rolled out and administered. My need for root was a band-aid, quick solution to work around the bigger problem.
I am a firm believer that NFS filesystems should not be mountable without root squash except on a trusted server. If security in your company is important enough to have multiple users and user groups, it is important enough to limit root to those that have to deal with that type of work on a day to day basis.
I can see possibly allowing for one developer in a department to have some level of sudo but only if that person in an IT type support role for the department. (This does not mean somebody who also does IT work because dealing with the IT department is slow and cumbersome.)
-I just work here... how am I supposed to know?
We have a special shell for some users that requires they enter what they're doing. They basically do "sudo bashforroot" and have to type in "installing foobarnator" and then they get a root prompt.
Imagine a Beowulf cluster of those...
Oh, wait a second. You already have.
Ask me about repetitive DNA
Why in the world do your users need root access? On Windows it makes sense; all too many poorly written programs refuse to install or run unless they can run roughshod over the entire system. But this is Unix. It's a rare piece of software that can't be installed and run as a user. Most can even be installed as a user but made available to others. Yeah, it's a bit more frustrating that you can't just install the latest RPM, but if you're skilled enough to install an RPM, you can probably manage "./configure && make --prefix=~/mybin && make install". Changing file ownership? Again, why do you want that? If you're sharing files with other users, get a group set up and chgrp the files appropriately. If you have lots of complex sharing needs, set up one of the Access Control List options.
Ultimately users shouldn't need root. Professionally I development clustering software for Linux and other Unix systems. I regularly install new applications I'd like to use in my home directory. Our administrators set us up with a good ACL system (courtesy of AFS). I do the cast majority of my work as my own account. The only time I need it is to test root-specific aspects of our software (if launched as root, it runs jobs as the user who submitted it). I can't remember the last time I switched to root, probably a month or so ago.
Unless you've got a damn good reason, your administrators are right to withhold root access from you. Your desires aren't good enough.
Search 2010 Gen Con events
I say...Hell no. Not on the main system. That's just asking for way too many security problems. These kinds of things are done for a damn good reason. Now...their own desktops, laptops, some isolated and limited test computer, whatever...that's much less of a problem. But letting users have root access, even limited, to the main system is just asking for trouble.
...and I do NOT WANT ROOT.
I have root on my workstation (cold dead hands and all), but not on a single server--not even a dev server.
sudo on things like mv and chmod gets you a root shell on the box fer chrissakes, why not just put the root password on a sticky on the rack?
When something goes wrong, I don't want to hear, "Maybe the dev did it." I didn't do it--no access. When we go to prod on something, I don't want to hear the admins complaining they don't know how to promote the app because some ass developer did it manually in dev instead of creating a proper install.
If you need root to chmod something, then your admin hasn't set up the box properly. Either he doesn't know what he's doing, or you haven't told him properly what sort of environment you need. Either get a better admin, or write up a clear description of all the functionality you require. Either way, you don't need root.
Of course, the smaller the business, the more likely an admin is a dev and vice versa. In that case, all bets are off.
I have to agree. Prior to my current gig (going on 6 years now) every environment I worked on allowed changes in production. The trouble never ended. People would make changes and bring everybody down. My current job has complete and seperate DEV/TEST/PROD servers. This has saved us a great deal of trouble. There is one other developer that works with me ( in Domino ), and we have complete control to do anything we want to Dev. Test and Prod are off limits for any changes. Even with this I will sometimes install a local server to try stuff that I KNOW will screw the system.
I can accept that I am human. I can accept that I make mistakes sometimes. Anyone that thinks they don't should be kept even farther away from production systems.
" ... basic SUDO rights like chmod, cp, mv, ..."
You don't need to SUDO for those commands for files that you own. You can even install software as long as it stays in space that you own. I don't care what you do to your own files.
Basically you need to have your entire filesystem layout setup properly, with "project" areas where each "project" has its own directory tree with setgid for the project's group on all the main directory and sub directories. Each major "project" would have a group setup for it. Then all file permissions would be covered by anyone in the group, or possibly a "project's lead" who keeps track of all the groups and knows what permissions should be set to different areas (i.e. for data sharing between projects etc.).
Once the infrastructure is in place, the worst thing that happens is that a person is not a member of the "group" and just needs a helpdesk call/form to gain group access ("ok'ed" by a lead member of the "group"). Basically something that can happen in 5-10 minutes time if implemented properly. With the setgid, all new files created in the areas will always be owned by the proper group, which has full access to chmod/chown those files (assuming someone doesn't do "chmod 700") but even then, cron jobs can be setup to run every hour or so that do a "chmod -R 770 /" to any/all project areas (with the cron job removed if you need to lock the area down to no access).
This is how it should be done, no sudo needed. All the work is in the preperation, with true processes needing to be setup and implemented (basically a form/forms for creation of a "new group" (which includes group ownership as well as a box to transfer "ownership" to another person), another form/forms for requesting new data areas (with what group owns the area), and finally a form/forms for adding/removing members to/from the group which gets signed off by the current group owner). Optionally another form for "locking" a data area to keep all access out. Then it simply needs to go to the IT staff which then simply reads down the "process" document and verifies the data in/on the form and either creates a new directory (setting the setgid bit and setting proper group ownership), adds/remove a user to a group, creates a new group, or moves a user to the first name in the group file (for easy tracking of the group owner or updates a seperate documents with this information).
We were all warned a long time ago that MS products sucked, remember the Magic 8 Ball said, "Outlook not so good"
Well, a possible solution could be to make a dedicated user writeable dir (/usr/whatever) where these advanced users cound install stuff.
..
...
Sudo is a no-no for me on the other hand for mv/cp and so on, but you can ask for scripts to edit certain files and to change stuff in a dir.
You migh optionally enable a bin dir in the users dir, so a "bin" user group could install stuff there (similar to option 1)
but again your setup might vary by unix (even by linux distribution). It is doable, just molest the admins enough
in unix EVERYTHING is possible imho (yes, yes now all windows admins just flame me)
After reading both you post, and your sig.
waiting for ad.doubleclick.net
If the user is the owner of said files, then he can chmod 'em all he wants. He can also move them, copy them, or delete them at random and then call the help desk and ask for restores. If, on the other hand, the user is not the owner of the files, then he has no business touching them on a production server. On a personal workstation - no problem. Sudo offers a good solution, when the user can identify specific things he needs to do as root and when the sysadmin has enough confidence in the user's technical abilities.
The bottom line is: the sysadmin is responsible for the systems he supports. If a problem occurs and it is determined that the user with sudo or root access caused it, the blame will still be with the sysadmin, who allowed the user to have extra access in the first place. Under normal circumstances the user does not need to have root access on a production box (although he may think that he does, but what he thinks is irrelevant... resistance is futile...). This is why we have development and test servers. Linux servers are no different in this regard.
I don't know about other filesystems, but ext2 and ext3 have had support for ACLs for a loong time.
And there's Linux kernel support for other security models.
tasks(723) drafts(105) languages(484) examples(29106)
This may or may not be the right time to ask, but I will anyway. I'm a Windows/Linux sysadmin hybrid, but more Windows than Linux. The reason being that we just don't have that much in the way of Linux or UNIX in place... but what is in place I help out with administering.
That being said, I would like to know if there is an object auditing system out there for Linux. If not, man it would be tremendously useful. One of the pleasures of catching unauthorized changes in Windows is to set the object audit policy at the group or local policy level, then tagging objects that you want audited and for what type of access.
Could someone educate me, either publicly or privately, doesn't matter, on a way to get this type of auditing in place for a production server environment? Or at least point me in the right direction? I realize of course this may be completely dependent on the type of filesystem in use by the machine... but still, good to know kinda stuff.
You most certainly do not need any sort of write access to /bin. Install stuff in ~/bin and set your PATH appropriately. Upgrading compilers? You do not need to mess with the system at all, just install as many compilers as you want in your home dir and use whichever one you need when you need it. And you shouldn't be setting the date, that's what ntpd is for.
I'll give you that you need root to set the date and time, but your system should do that for you with NTP, so it's not that you don't need root for that, but that you shouldn't have to do it...
/bin unless you're the system administrator. If you develop software that can only be run out of a particular directory, please post your name and address in a response to this comment so that those of us who have been forced to use such software in the past can come beat the living snot out of you.
But for your other examples... You do not need root to upgrade your compilers. You do not need to install things in
If you're a developer, you should probably have your own machine, which you would have root access to, but save for setting the time, you don't need root for any of the tasks you've described. Your license to call yourself knowledgeable is hereby revoked.
Even if you do have root, unless you expect the users of your software to have root access as well, you shouldn't be using your root access, or you'll end up wondering why your users have problems that you don't see on your development system.
Segregation of Duties
I work in a company where everyone has root on all of the develipment Unix machines. Sun, HP and even mainframe boxes. We do not all have it on our windows boxs, and that seems to work OK.
THis allows us to develp however we need to and to call the IT admins when we need something done on the windows desktops. Its weird and it works.
If you frequently need to chmod files you do not have access to then someone is doing their job wrong, but giving sudo out is lunacy.
As for the packages, install them in your home or have the admin do it.
The admin needs to know 100% what packages are installed at the system level period.
Wow, sent an e-mail as suggested when clicking on "use classic" banner, and got a fast response that addressed my msg
I agree with the comment about NO ROOT ACCESS EVER.... This comment shows that the person making it has no idea what they are talking about. Software developers write software, the system is a tool and sometimes you need root access - ever tried to run snoop or tcpdump, guess what, you need root access. I agree that shared systems have to be tightly controlled, but I find that many sys admins don't get it that their job is to help the users (developers) to do their job - they think their only purpose in life is to say NO and stop them from breaking things. Maybe an attitude adjustment is in order..... (next time how about saying instead "no, but here is how I can help you get your job done") ok, flame off.
If the system is truly "PRODUCTION", the users should never ever ever ever ever get root. Root in "QA" and "DEVELOPMENT" environments is something else entirely. I would say not in "QA" environment as that should be a mirror of "PRODUCTION", used solely for testing updates before fragging the "PRODUCTION" environment. In "DEVELOPMENT", the developer monkeys often legitimately need root to work out the issues, change service configs and restart, etc.
By the way... as primarily a network engineer... how many of you out there truly replicate the "PRODUCTION" environment in your "QA" and "DEVELOPMENT" environments... ie: the same model and numbers of firewalls (in HA or Firewall load-balanced config), GLSB's, SLB's, routers (with redundant routing/forwarding engines), IDS's, switches (with redundant routing/forwarding engines and its GLBP/VRRP/HSRP peer), SSL offloaders, etc.. in addition to the web, application, and database servers that all that infrastructure is there for???? I'll bet almost none..... (full replication of a POP architecture is fairly standard in medium to larger ISPs so that a bug, code update etc can be tested/isolated w/o fragging the revenue generating ISP network... the "lab" expense is justified as on-site spares for when the network infrastructure has a meltdown...)
If you're going to spend the money on a Beowulf cluster, I suspect you have a network security engineer or someone acting in a similar fashion. If a user was given sudo access to change permissions, move, and copy files how would you manage these changes? Do you plan on keeping a log book with the changes you've made, why they were made, and the positive/negative effects of the changes you made? In a small business of around one or two administrators sudo access loses a bit of its charm since they literally are root. Once random workers go around the office changing files, your risk management and security plan are basically screwed.
For starters, since you're asking this question about giving sub-root users sudo access, I feel your security engineer isn't working at his best. Having you guys believe in his work and understanding why his activities are needed is important in maintaining a secure environment. Obviously you question his motives.
I do have a question. If you're going to be given access to commands such as mv and cp, what stops corporate espionage in this situation? Is it a log file the admin must scavenge through for days just to search for an inconspicuous cp without an attached reason for the commands execution?
That'll make a big dent in the trillion $$$ debt!
Poor SUN - hahahahahahahahaha - let's kick 'em while they're down!
UNIX was designed with three (3) levels of permissions:
1. Root.
2. Group.
3. User.
This has worked fine for three decades.
If you are a user and need group access or you need something done that would alter the system, then yes, of course, you need to involve someone with more authority.
Otherwise, your normal daily tasks should only require modification of files you as a user have permission to modify.
The wide availability of linux, making every installer 'root', seems to have altered the mindset somewhat. Which was a mistake. You should have been doing very little as root, and as much as possible as an ordinary user. Then you wouldn't be on a UNIX system and thinking like a Windows user...
(N.B. In most corporate shops, even that's going away; Windows users now get far less access than they used to.)
Any user important enough to need root is important enough to have access to development machines where he or she can fuck things up with impunity. But on live systems, only a moron gives root to users - especially if those users are developers!
This is slightly off-topic, but a nice story. I work in a research group at a university as a researcher. In our group we have a system administrator who makes sure that all our desktop machines keep running Windows smoothly. On my first day at work I told him I use Linux at home. His response was: "O, would you like to have an administrator password for your computer?" Which I gratefully accepted of course. And until now (two.5 years later) I never misused it so we're still on good terms :-)
-- Cheers!
Is there any good reason why a user would need to change files outside of their home directories? Other than a cruddy setup done by a mediocre sysadmin, in which case they probably give users way to much freedom anyway, so it's not an issue until the whole system's taken out, and needs all sorts of messy work to have up again!
Hell, at time I think I shouldn't even give the users a keyboard and monitor. It's not a question of if the users will screw something up, but when. They are ALWAYS doing things they shouldn't. Thus the less they can do, the better.
The worst are the "I'm a sysadmin" types. For every one I meet that actually has the experience to make them a competent sysadmin, there are 50 that know just enough to be dangerous, but think they know it all.
For example some time ago I decided to roll Firefox out to the educational labs and make it the default browser. All other considerations aside, it's minority status in the browser market makes it far less of a target. Well a couple days later I get some guy in who's bitching about Firefox being installed in "his domain" and he wants it removed. Upon further questioning, it becomes clear he believes that programs are installed in user accounts. I cannot seem to convince him that the program is a local installation on every system and no, I'm not removing it.
Now for Windows systems, the damage someone can do is somewhat limited since all software installs are on the local system. However the UNIX systems all run off a central server. Like hell we are giving anyone anything but read access to that. All the time people want things installed or modified for their particular project. Quite often, they have no idea what they are asking, and what they want done would completely break the app, or worse.
I agree that access should be as limited as allows you to get the job done. Now, in some cases that needs to be total access. Fine, you get a system that's seperate and you assume responsibility for it. If you are doing something such that you need system access, you'd better have the knowledge to fix what you break. In other cases, come to us, that's what we are paid for.
We even operate that way internal to our group. I don't just go and change shit in DNS. Not because I don't know how to, not because I don't have the root password, but because it's not my area. Better I should ask the guy who is supposed to do it. That way, there's less chance somerthing that gets broken.
I think the problem is that some users have a real inflated sense of self importance and entitlement. They think that their project is real, real important, more important than everyone else's. Thus they don't have the time to wait to have the admins do things, they want to just be able to do them themselves. If it messes something up, well then the amdins can fix it. Of course people like that are also the most likely to do something that will break things for others.
The more shared the resource, the more you have to be strict with the access. Even on user desktops, limited access needs to be the rule. Support can't spend hours and hours fixing problems caused by users that don't know what they are doing. It's just not cost effective.
If you truly have the need and knowledge to run your own system, then fine, take it up with management. However part of that understanding has to be you can't bother the support team if you hose things. If you aren't good enough to admin the thing yourself, you probably ought not have admin permissions.
You should set up Solaris RBAC (Role Based Access Control), it's designed to tackle just this sort of problem. Oh wait, you ditched Solaris for Linux. Nevermind.
In the environment that I manage, only the admins have sudo priveleges for any kind of system command.
Developers that need to run certain programs as other users (such as the userids that certain application services run as) we write scripts that can only be modified by root, and then give the individual users rights to run them. The scripts are written to disallow break-outs (like interrupt, kill, etc).
The admin users do not have access to the root account - unless the machine is down, and root access is needed to bring it up. Then we get the root passwords out of a lockbox, that requires management to get access to them.
The rest of the time, the admin users execute commands as needed via sudo. Any time an admin uses the sudo -s parameter, they have to add an entry to a log book as to why, what commands were run, and for what reason. All other commands run from sudo, are logged, and the log entries record to the equivelent of WORM storage.
If a user needs something changed, they submit a request to their supervisor, who then passes it on their manager. Management has to read, understand and approve the request, before forwarding on to the admins to have the work done. If it passes admin checks and approvals, then they can get it done. If it doesn't pass, then a discussion is started, as to why they thought they needed it, and their reasons behind it. Sometimes the users make silly requests because that's the only way they could think of to get something done. Usually one of the admins can come up with a better solution that solves the user's problem, without doing something odd to the rest of the system.
If a developer needs something done, the request has to pass a peer review before the request is ever submitted to the admins. Once submitted the process flows through very much like the user requests.
So in short, users NEVER get sudo access, developers rarely get sudo access, and when they do, it's very restricted to scripts they cannot modify. All sudo access records are written to media that once written, cannot be changed.
Who is general failure, and why is he reading my hard drive?
Check out the 'rootsh' package for a logged/auditable shell meant to be launched from sudo. When launched from sudo, it can provide a full root shell so it might not suit your needs.
I've installed numerous versions of Ada and C++ compilers, window managers, gtk, qt, lyx, and more in ~/bin under Solaris without root. Almost all file permission problems are solvable by contacting the file owner directly without involving an admin, and that's usually the courteous thing to do anyway. Things that do actually require root are few and far between in my book. Even if you really need to do something regularly like restart a web server, it can be easily arranged with a one time change to a sudoers file or something. However, that is the exception rather than the rule.
This space intentionally left blank.
At MIT, all Athena workstations have the same root password, which is freely distributed. Any user can get the root password by typing in tellme root at a console. There are thousands of these machines scattered all around campus, with many different hardware configurations. This has been policy for many years now. Sometimes you get stupid kids doing stuff like this, but other than that, it seems to have been working...
if you work for Sun.. Why do you not know the Product name is Trusted Solaris (not secure Solaris.. what is that ) and you should also know that Trusted Solaris is a PL4+ system under DCID 6/3 and you guessed it .. SELINUX has acived PL4 + and TSABI with Net Top II.
No.
Because they will break the system and then they will blame the IT department. Logging lets you know who did it but the blame is still entirely assigned to the IT department.
Developers are even worse because they think they know it all but 9 times out of 10 they know next to nothing about system administration. I would be more willing to give sudo rights to a normal user who follows a documented procedure than I would to a gung-ho know-it-all "hey I run Linux at home gimme full root access" developer. I've seen developers chmod 777 their files because they don't understand permissions. Do you think I'm going to trust them with root access to mv or cp? No chance.
I've seen developers ask for sudo access to run patchadd, to run pkgadd, to run pkgrm, to run vi (how I laughed at that one). They are rejected every single time. If they have a process that needs to run regularly as root then it can go into a script in /usr/local, permissions will be locked down so only root can modify the script, and a limited number of users will be granted access to run that script. That's as good as it will get without divine intervention (aka the CEO).
If the application developers are making changes that require frequent superuser access - especially to commands like chmod and mv and cp - then perhaps they need to rethink what they're doing. It sounds to me like they're doing something wrong.
Eventually you get someone looking for space and you get someone deleting something like /boot/vmlinuz on a linux system and letting the magic virtual smoke that starts the machine escape.
If you can't bring it back from bare metal with little in the way of consequences then no-one gets the password that would possibly abuse it. Most developers should be able to get root on anything where they can physically get to the hardware anyway, and some will do it even if asked not to - so an answer is to let them have root on their workstations and test machines - have a good way to get those back from the dead with minimum agro, since people will panic and blame others for their own mistakes - and lock everything else down or at least put it in an unpleasantly cold room with lots of loud noises so you can hear if anyone goes in.
A great quote from someone who has been using MS Windows machines daily for ten years in an office and should know how to drive them by now: "I saved it to "C" drive you idiot, you should be able to find it there on the other computer. You mean all the "C" drives are different? Why did we bother to pay so much money for a network then?"
Install Gentoo NSA SElinux and whip up a policy to cover these pesky guys.
After a month or two worth of feedback, the system should stablize to the point of giving it to the researcher what they want in an extremely restrictive manner.
The time invested results in a secured system that behaves exactly as your policy dictacts AND still be giving out 'ROOT' liberally.
I think the post is trying to say what happens in government operated labs. I can tell you about what happens in various national labs, such as LANL, LLNL, LBNL etc, since I work in one of thoes labs. Sometimes it happens that even a genuine person needing root/sudo access do not have that access because of the "undefined" security reasons. One of my colleague have to leave his job just because he was hired as a kernel programmer and was not given sudo/root access... What the hell!! In a research environment, it becomes necessary that you give users full access to atleast their own machines. In national labs, the situation is a lot worse that what you guys think.
If I give you root access, you are by definition the administrator responsible for that box. If you get the root password, then my next act will also be my last as root--expire the root password, to force you to change it to something I don't know.
Nobody gets root access except senior admins. Nobody gets sudo access, except for admins and DBAs. These rules also bar former admins who are currently in a different role.
My question is why did you convince them to move from a Sun to a beowulf cluster? Was there a legitimate reason, or was it a pet love of Linux?
"People who do stupid things with hazardous materials often die." -- Jim Davidson on alt.folklore.urban
Just logging the sudo commands isn't going to give you nearly the auditing ability I suspect you're looking for, and giving them any kind of root-level access to the filesystem is game over.
Figure that any chmod u+s is suspicious and will get caught?
Figure you'd notice their subsequent use of whatever new sudo permissions they just gave themselves?
And, look at that, suddenly their UID is 0.
The list goes on...
"keep them in line" the arrogance of those words is so flagrant....you most be a horrible SysAdmin. How about respect, expect the best, be actively invovlved with the users. Oh, I know that's actually hard work. Forget it, just keep them in line. By the way, without "them" you wouldn't have a job.
I'll agre with the masses here, but point out it's about the admin who installed the machine! -- If you're a user... and you need root for any reason, you're not doing user things... you should be in the correct group, or all the things you need access to should be granted... if you're missing something, then you have to call the admin and let him know... he screwed up. Er-go helpdesk.
/bin changing permissions... that's a problem.
If you're in your home directory and need to alter permissions and can't? that's a problem. If you're goign through
Have a chat with your admin about why you're needing it, maybe he can explain why you don't. Or at least fix what he screwed up.
- Brett
I have a somewhat balanced view of this, as I work for a University and have a variety of different interactions with Solaris and Linux. What follows is a few notes on Linux vs. Solaris and Access Rights across different categories of system
Firstly, our Production MIS Systems:
Nextly, our Development MIS Systems
Thirdly, Academic Development Systems
> Like most historically UNIX shops, they don't allow users even low-level SUDO access, to do silly
,so I understand their perspective and wish to keep control over the
> things like change file permissions or ownerships, in a tracked environment.
This has nothing to do with "history". While I would agree that there are things that admins do for "legacy reasons" that don't really hold up anymore, I believe that this particular rule is in place to insure the security and availability of a particular system or service. If you can tell me how root or sudo access for non-admin users lends itself to said security or availability, I'd love to hear it. Otherwise, the rule stands in my environment, and every other environment I've been in where there are more than four machines considered "production".
> I am an ex-*NIX admin myself
> environment, but as a user, I'm frustrated by having to frequently call the help-desk just to get a
> file ownership changed or a specific package installed.
Those are, I'm afraid, the proverbial brakes. Furthermore, if you truly did understand their perspective, you wouldn't want to be handing out root/sudo access to whoever says they need it. Any admin with any experience knows that when a user says "I must have root", it's usually the last thing they need. Rather than maintaining an environment where root and sudo are standard issue, it's far easier to control an environment where root is a tightly held privelege given out only to those in charge of maintaining the systems and infrastructure.
> If you're an admin, do you allow your users basic SUDO rights like chmod, cp, mv, etc (assuming all
> SUDO commands are logged to a remote system)?
Absolutely not. If I were tied to a pole and placed in front of a firing squad and told to give non-admin folks root/sudo access, I'd still, at the very least, request that they draw up a waiver for me to sign saying I've performed this sin against my better judgment, under severe duress.
> If no, why don't you? If you allow root access to your knowledgeable users (ie developers with
> Linux experience), what do you do to keep them 'in line'?
This is really kind of a ridiculous question, I must say. "Developers with linux experience" != "*nix admin". Developers are well known in every environment I've ever worked in for writing algorithms that make your head spin and then five minutes later emailing the help desk to say "Yahoo is down, can you please fix it". They aren't admins. I wouldn't care if they were. They're not admins in *my* environment, familiar with *my* environment's systems management policies, they have no clue what sort of compliance procedures we need to follow, what other users on the system are doing and the resources *they* need, etc etc, the list goes on and on and on forever. The answer is no. No means no. No is always no. When I say no it means a thousand times no.
I've even had C-level types force me to give them root. That's when the old "create-a-fake-root-account-with-uid-501" comes into play. Look it up.
Good luck.
Visit my blog http://www.protocolostomy.com
In the traditional Unix model there isn't as much to worry about: "Make sure you can't get to root from joe user" is most of the problem. We can't get that right but at least it's just one account, oops, I mean "role", to worry about.
So let's make it more complicated. Instead of 1 role let's have 12: user admins, backup admins, repair admins, each with enough oomph to do some real damage, some with enough oomph to ratchet themselves up to effectively being the near-equivelent of root.
I'm not saying the "role" approach and ACL's and the rest are the wrong way to go. I am saying they are tools to be used with care. There is a real cost of overhead in keeping track of all the cross dependencies and cross exploits...and that overhead can increase combinatorically.
Personally I think of them like softlinks: Overuse softlinks and you have a speghetti filesystem. Overuse roles and ACLs and you have speghetti security.
Use them right (and you can use them right in VMS, Solaris 10, SeLinux, etc.) and they can be your friends. Your high-maintenance friends, but friends.
this is a development question. it would be great if one can do network based sambamounts without sudo on linux such as in hp cifsmount is separate from cifslogin how do you take care of those situations without giving user access to sudo
I set up a box for a friends kids and he doesn't mind them having the ability to have limited sudo access to install software and check out new stuff. It's for them to tinker around with and he expects them to muck it up eventually. But is there any way to prevent each user from having access to each other's home? He doesn't mind if the system gets hosed, but in some cases what's in a user's home is more important than the actual system. Is there anyway to accomplish this?
Good practice is to allow users to do everything with their own files under their own UID/GIDs. The main restrictions are that you don't let users do a chmod u+s or a chown. If you want these, or if you want stuff installed on systems directories, you have to call the sysadmin.
I have been a developers for over 10 years now and have happily used the services of the sysadmins. Sysadmins also appreciate to receive requests that are technically OK and that are written respectfully.
I have seen many juniors struggling with the concept of trusting sysadmins. After a couple of questions I usually find an easy way for them to do their work without being bothered too much by these restrictions.
The systems I develop nowadays I prepare under a mortal user ID and package these. The package installation (in system directories) and the running of the software under a technical UID or under root -you should limit root execution- all fall into a clear development cycle (development, integration, production.) To be a software developer means submitting to certain procedures which make you less indispensable and therefore your organization more stable. If you're not prepared to work this way you'll never be a pro.
I hadn't the slightest objection to his spending his time planning massacres for the bourgeoisie... (P.G. Wodehouse)
SOX, VISA CISP, Payment Card Industry Data Security Standard, Mastercard SDP, CA SB1386, HIPAA, and a soon to be flood of personally identifiable legislation.
We are having to lock everything down.
.. And not the other way around. I'm a developer, I tend to be understanding of sysadmins: as long as they give me local admin rights to my machine. Especially in larger organizations, sysadmins can be real pain. Often they don't know (nor care) who you are. Getting anything done requires getting a helpdesk ticket, which will end up on some desk. Then maybe three days later some guy picks it up. That just sucks if you are trying to get your job done.
At my current job one of the first things I did was request local admin rights. I think the guy must have understood that I'd be inserting a lot of helpdesk tickets in his queue if they refused the request. In any case, I've been pretty happy since and haven't had to bother them since.
Jilles
Why do users need to change file permissions? If people are sharing files then they should all be in the same group. Then all the files should have the group ownership set already. If they are managing their own files then they should be in their home folders with user ownership. If the system is setup correctly then users should never have to chown or chmod anything. If you think they do, then you have a problem elsewhere. Don't give anyone root but root. And if possible, don't even give root root. Trust noone.
The GeekNights podcast is going strong. Listen!
There are two issues you're arguing here, one having little to do with the article. First let's look into the administrative issue.
I agree that there's little reason to give any user root access. Note I didn't say in a secure environment, a cluster may very well not even be on the network. In general, a user should not have root access even in such an environment unless they are the person responsible if the system goes down. Limited privileges may be given through sudo, but any program with the ability to modify system files (editors, file modification commands etc) should be blacklisted entirely from sudo. Short scripts which the user may not modify might be exempt, for instance if the user is developing a kernel module and the module needs to be inserted/removed. In a production (non development!) environment, anything that modifies such low level parts of the system is out the window. Starting or stopping a service such as Tomcat may be negotiated through sudo, but this should again be done through scripts which have been examined by an administrator and is not modifiable by the user.
When it comes to clustering, I disagree wholeheartedly. I've worked with several variants of computational systems, including many large systems, and I have to say that Sun is really not the best choice for brute force computation. They make excellent workstations and servers, but for throwing a lot of CPUs at a problem Linux on x86 hardware and its variants is simply a better platform in my experience. The programming environment needn't be as different as you suspect, and there are a variety of excellent clustering packages such as Scyld and OpenMosix which make clustering quite painless if ease of use is more important than the results. Typically the speed of obtaining results is the most important issue of course, and this is the area where Linux/x86 shines. You simply get more CPU for dollar on commodity hardware these days.
GPL: Free as in will
Admins and developers always fight. Sometimes it makes sense to give the admins control and other times it makes sense to give the developers control.
If it's an internal system then I would give the developers root access. The worst thing that could happen is that you lose two days work. One day is lost because you have to go back to the previous back up. The other day is lost reinstalling. If you don't have backups or it takes more than a day to recover then you have a more fundamental problem.
There are seriously a lot of times when you do need root access in Linux. For example, if you want to loopback mount an ISO image and extract some files. Sure you could copy the image to your local box, but if it's at a remote site it could take an hour and use up the bandwidth for everyone in the office. It's a small thing but there are a million small things like this and my job is to bust tail all day long and someone is going to be hurting if they get in my way.
My experience is that people will surprise you with the good things that they do when you trust them.
I used to work in a prison before moving into INFOSEC. One old prison officer gave me some good advice regarding prisoners. "Give them nothing and take them nowhere." I think the same regarding users on a Unix system (or a Windoze system for that matter. Give them nothing.
"Flags are bits of colored cloth that governments use first to shrink-wrap people's brains..."
I'm an Oracle consultant and occasionally do work for a Canadian provincial government.
They are idiots.
The "OS" guys walk around with cendescending, power tripping egos and do not allow root out to anybody not in their group.
Meanwhile, they are running stupidly unpatched Solaris boxes with tons of old, unpatched code.
We were doing some late-night failure recovery stuff, and the OS guys weren't around, and we needed root to do some stuff. We paged them at 1am. By 3am, still no call, after 4 more pages. We eventually said "screw this", and TOOK root. (The easiest way was to modify a script they'd left as setuid, but left it world changeable.... how moronic!) After dealing with this problem for almost 20 hours, I was feeling a little pissy, and changed the root password on them. They came in later on in the morning, and next thing you know, a whole gaggle of them are walking over to us, demanding to know what was going on, as they couldn't log into any of the 5 boxes in the cluster we were working on.
I proceded to give them shit for being idiotic, lazy government workers that didn't know their ass from a hole in the ground. They had a whack of code that was running that had known exploits, and their only reason for not upgrading was because it hadn't been tested and approved yet. (For months and months, it seems). To top it off, the head of the entire IT department was sitting in the cube next to us, and wasn't impressed. He gave me crap for it, but later thanked me for pointing out the issues. Since then, they've called me back to perform periodic security audits.
Not the most comfortable of situations (those guys are NEVER going to like me), but at least they learned something.
$0.02 (CDN)
In my lab, a colleague and I started playing around with subversion, and set up a repository. Using ssh to access the repostory, we created it where one of us owned it and we are both members of a group, svnusers created for the repository.
So far it works great, except, that when one of us owns the repository, say the owner is me with the svnusers group and rwx for me and group, the remote berkely db access barfs on a permissions error.
Any idea how we can get out of sudo'ing chown commands on the repository directory to fix this? Also, can I force ssh to set the group for files I update to svnusers?
A NAZI BOX!
;)
;)
;)
Let's create a host server for this setup of lots of virtual servers, they want to mangle, they'll get to mangle!
Now, give them all their own "systems", which is the standard system, ALMOST, except some files are fetched from there for services like HTTPd etc.
Now, to make it work, with little effort to administration: on every boot it's a fresh copy out of a image, overwriting all EXCEPT their home directory.
Now, add to the mix an interface to do NFS/SMBFS/XFS or anything alike, hell even FTP if that's enough, to easily add perms to some files and/or directories etc. store these configs of their virtual servers so they will be up & running again always.
I'd use somekind of network storage server/device for those home dirs & configs + logs(naturally, track those bastards!)
Also, don't allow network services on those virtual servers, ie. have them on 10.0.0.0 network so they don't get routed outside.
Route all traffic to these thru separate box and sniff all data going in & out, so it's easy to find abuse, have a script checking
special cases (someone running nmap? HELL NO!). and to make it easy to track user's doings, don't allow SSH, only telnet
Now, they broke their system? Just reboot it, have an interface to easily reboot their systems (max once per hour or so)
It's simple, it's effective, it's stable for production servers, what else you need?
Oh yeah, someone comes bitching, well... you are the BOFH afterall, close their virt server
as a side note: i made this all up as i went on
Pulsed Media Seedboxes
... to do the things they are authorised to do, and never, ever let them have root. Seriously. Also, if you're doing anything at all important on the machine, record every root login including who did it, what was done, when, and why in a log which is not kept on the machine. A paper log book is not a bad idea, although a log kept on a separate server will also serve.
I'm old enough to remember when discussions on Slashdot were well informed.
It sounds like your government contractor employer does not have or at least doesn't pay much attention to their security policy. A simple, easy to follow role-based policy can go a long way. It specifies in simple terms, exactly what a user can do, can't do and must do. Each user role should be covered. Technical controls can be implemented (i.e. ACLs) to enforce the policy. Your employer should also have standards and procedures to augment the policy, one of which should be IT Change Management.
The bottom line is that developers should NEVER have root (sudo or otherwise) access on production machines. They shouldn't even have user accounts on production machines in most circumstances. SuperUser access on shared development machines is even questionable.
Make sure your users, developers and admins understand their roles and you will have a relatively happy and well functioning IT dept.
Why Linux topic has a unix logo ? :|
Transfering files using chmod to other users in same group don't require Root.
Way around this setup group with access to all user groups but not roots or core admin accounts. Give this to the webdevelopers they can do their job.
In case of user to user shiping I normally use a controled program that does the transfer. Ie the program is SU but the user using it is a normal user. No need for user to see inside another user accounts without permission. Normal Unix is common area or email I have a third a transfer program.
Working at the largest Dutch Electronics Company, using Linux only. I have no root, never needed it. I can change all files I got to change, or call the owner of the files if I can't. Never have to install software, or can do it within my own account. They got a system that I can choose between 10 gcc versions, 4 matlab versions, 3 gimp versions, etc. With just one single command I change gcc release. Works fluently.
Whoever needs root has very bad sysadmins.
Your example reminds me of an experience I had about six years ago. I had just started my current job as a sysadmin and we an entirely Windows network. The network has recently been converted over from Novell to NT4. Our "head sysadmin", who had allready been there for two years, and had certifications (MCSE, CNA, A+) coming out of his ass, and because he was the only one of us with certs, he was only one who had domain admin priveldges. The rest of us had to get by calling him five times a day to have him do trivial things like join a machine to the domain. The problem was, "Mr. MCSE" really didn't know jack about how a Windows domain worked.
So one day, our of the blue, we start getting *TONS* of phone calls from people all over saying they can't log on to their computers. As I'm answering my phone assuring people that we were looking into the problem, I notice that I can't log in either. The departnment head comes in and says she can't log in either. So I log on my machine with a local account and verify that all of the servers are up and the network is working. It is. So I start poking around some more. I open up the "Network Neighboorhood" and find that instead of eighty-plus computers, there are about ten. The ten computers were all of the servers, plus "Mr. MCSE's" workstation.
I turns out "Mr. MCSE" thought the network Neighboorhood was "cluttered" (he didn't like having to sort through all of the computers when browsing for the servers) so he decided to do some "housecleaning" - by deleting every computer account in the domain, except of course for the servers and his workstation.
We had to go out to every workstation and rejoin it to the domain.
I don't always use unix-like operating systems; but when I do, I prefer FreeBSD.
shared Linux system? they can use one of the many public exploits to get root status if they want it.
oh, you do make sure that the systems are completely fully patched, arent running the supplied kernel
and arent running packages that are not needed at all do you?
cp /bin/bash ~/foo /etc/syslog.conf
sudo chown 0:0 ~/foo
sudo chmod 4700 ~/foo
~/foo -e vi
The system administrators in some environments may not have access to do some of those commands listed. That function may be reserved to the "security administrator" and no I'm not kidding. I'm a system administrator by trade and I know this is coming at some point in our environment. There are a great number of details that would need to be worked out before we run down this path. I work for a fortune 500 company and we do not work with the DOD.
In our environment, we have application accounts and we have different rules for different classifications of systems. On our development environments, the developers have access to the application account(s) associate with the projects to which they work. On production environments, because of good old SOX compliance, the developers can get access to the application account in emergency situations, but the security and the change management folks will have a full keystroke access log of what the developer had done and the projects AVP is notified of the unscheduled changes. At this time we are using PassGo's UPM (this is almost identical to Power-Broker) to manage and control access and it works pretty well for interactive commands.
Much of the documented need was for SOX compliance for our financial system, however we have some critical safety systems that the same rules were applied some time ago and rightly so more rules are coming.
Good luck.
I have worked both as an admin and a developer, and I can tewll you the real answer to this problem, and it does not involve giving out root.
The whole reason people get pissed at admins and want to do it themselves, is that they always feel the time crunch. They have project X that is due on Friday, they submit a request to have something done to the server Wednesday morning, and it still is not done by Wednesday afternoon. This is not always the admin's fault, they have priorities too, and sometimes it is hard to juggle all the requests because he doesn't really know what the real priorities are in terms of the company as a whole.
The solution is to implement a trouble ticket system for all admin requests, and give managers access to it as well, allowing them (and only them) to adjust priorities of requests. That way, managers can set the priorities of the requests to the admin as they see fit. As well, because the managers all know that the developer *did* make the request, and there is a record of it, the developer feels less worried about delays coming from the admin department (passes the buck), and less pissed off at the admins.
The beauty of it is it also takes some responsibilities off the admin, and gives it to the managers, where it should be anyway.
Most programs can be compiled & run without doing a system-wide installation. Users can put their own binaries in ~/bin and set appropriate paths for required directories. I remember I had to do this 15 years ago with 'screen' on a system (I had a terminal), because the sysadmin didn't want to install it. I do it today with my custom compiled version of R.
The only boxes developers should ever have root on are their very own clone-drive virtualized sandbox instances, where they can develop on and rm /usr/lib/* to their heart's content without having to call us every time they screw something up.
NO!
If you mod me down, I *will* introduce you to my sister!
You really need to get over the fact that you're not a sysadmin and therefore should not be granted rights to do administrative tasks on systems. What you were in a previous job is irrelevant. You're currently a developer, so focus on that rather than being a pseudo admin.
You really don't want to have any more access then you really do need. If they gave you root access and something happened to the system they will point their fingers at you faster then you could type "df -k". And it will be up to you to prove that you didn't do anything to crash the system (assuming that you didn't do it). Governments employees are Union workers and Unions really hate contractors because we tend to be more efficient then Union workers without paying the union dues, so if they could find some proof of a mistake by a contractor they will be merciless. Hopefully you are being paid by the hour so you will get paid even while you are waiting for the sysadmin to install the package.
If something is so important that you feel the need to post it on the internet... It probably isn't that important.
OK - end users fair enough, but what about the users who *manage* the box ?
At my last job the audit procedure was totally mental. An example: We were the engineering team for the global email backbone (around 90 servers). Our software and scripts run on all of these servers (as root in many cases). But we weren't allowed root access, so we couldn't install any thing or even debug live systems properly. That was the job of our "ops" team. We package the software, they deploy it. Any problems, they tell us and we have to fix it and redeploy it. Even though our ops team had root, they couldn't just login and do things that needed doing. They needed to file a change request - which took a week and had to be approved by about 10 people.
BUT
Despite having root they couldn't just do what they wanted. Every su was logged to a database and they had to give reasons for every one. And as for adding users, modifying system files, fixing permissions....nope - that was the job of the SAs!
So, when a problem occured on a production box, rather than logging in, suing and fixing it, the procedure was as follows:
I resigned.
ftp://ftp.funet.fi/pub/local/src/omi-file.tar.gz
It allows users to grab ownership[1] of files in certain per-user configured paths, whenever they need to (sample config file included). This allowed us to manage the incoming ftp directories without going insanse.
It was written some 15 years ago by Matti Aarnio.
[1] Ownership is "omistus" in Finnish, hence the name of the tool
Trusted Computing FAQ | Free Dawit Isaak!
If I understand your process, you have some poor guy whose job is to handle a horde of little changes. Very hard for someone to keep track of these things to work out their overall consequences; it should be automated. But the implication is that it's not and I'm guessing he uses his wit and wisdom to spot obvious bad things. Worse, you may have a team following someone else's rules which they neither understand nor care about. Also a helpdesk team finds it harder than an individual to keep a view of the overall system. It's easy to see that going wrong by simple human error, which is more common when you have to have a relatively smart person doing a job that 99% of the time is dull. I bet there's more staff turnover in this role, eventually of course the point of stabiity is when you end up with someone who can't get a better job, hard to see that as good. How do you keep them sharp for the It seems to me that a rules based system could capture the essence of this job, and something that will make your security audit peple happy is that the software can be tested. I wonder if there exists such a tool already ? (feel free to reduce my ignorance here) It strikes me as a rather good candidate for an open source collaboration.
Dominic Connor,Quant Headhunter
If you're an admin, do you allow your users basic SUDO rights like chmod, cp, mv, etc (assuming all SUDO commands are logged to a remote system)? The hard way: $ sudo cp /etc/shadow /tmp/researchfile
$ scp /tmp/researchfile otheruser@randomhost:~
$ echo "/usr/sbin/shutdown -r now" > myscript
$ sudo chmod +s myscript
$ sudo mv /var/log /tmp
$ ./myscript
Really the long way of doing things, too much sudo! Lets rewrite 'myscript'
$ cat myscript
cp /etc/shadow /tmp/researchfile
scp /tmp/researchfile otheruser@randomhost:~
mv /var/log /tmp /usr/sbin/shutdown -r now
$ sudo chmod +s myscript
$ ./myscript
Hell, I didn't even need to use 'cp' and 'mv' with sudo, only one entry, a permission change! (This is also assuming that you're running a system which is configured to wipe /tmp as part of the power cycle)
No sudo on chown or chmod or chgrp. No sudo on cp or mv (especially stickybit on directories set!). You have to have great trust in your users because those three commands just lost you a system...oops.
I always wondered where this setting was...
for asking the sysadmins to do stuff for you.
it's called email.
my password really is 'stinkypants'
If you're an admin, do you allow your users basic SUDO rights like chmod, cp, mv, etc (assuming all SUDO commands are logged to a remote system)? /etc/shadow /tmp/researchfile /tmp/researchfile otheruser@randomhost:~ /var/log /tmp ./myscript
/etc/shadow /tmp/researchfile /tmp/researchfile otheruser@randomhost:~ /var/log /tmp /usr/sbin/shutdown -r now ./myscript
/tmp as part of the power cycle)
The hard way:
$ sudo cp
$ scp
$ echo "/usr/sbin/shutdown -r now" > myscript
$ sudo chmod +s myscript
$ sudo mv
$
Really the long way of doing things, too much sudo! Lets rewrite 'myscript'
$ cat myscript
cp
scp
mv
$ sudo chmod +s myscript
$
Hell, I didn't even need to use 'cp' and 'mv' with sudo, only one entry, a permission change! (This is also assuming that you're running a system which is configured to wipe
No sudo on chown or chmod or chgrp. No sudo on cp or mv (especially stickybit on directories set!). You have to have great trust in your users because those three commands just lost you a system...oops.
(grr, forgot to switch to plain old text!)
I always wondered where this setting was...
> Users != Root. ...
>
> --
> "Those who would give up essential Liberty to purchase a little temporary safety deserve neither liberty nor safety."
One of the places I contract solves this problem by providing everyone with Virtual PC. They have Windows boxes which are locked down but you're free to do what you want with the Virtual PC. Yeah, it's slower. You're probably not going to run any batch jobs with it. But it's great when you need your own tool (or OS) and can't convince the sys admin that you need it. Given that it's a Windows shop, I couldn't work there without it.
Devon
If you allow root access to your knowledgeable users (ie developers with Linux experience), what do you do to keep them 'in line'?"
You put a stipulation in the Acceptable Use Policy (assuming your company or business has one) that any abuse of resources they have will result in termination. If you have a good logging system, any abuse will be quite evident and allow you to back up that person's boss in the termination.
On a production box, the admins have access to sudo, and root itself is locked down except for scheduled maintenance/upgrades or emergencies. No paperwork, no root.
As a developer with over 15 years *nix experience, I have never had root access to a box unless I was doing an install, except for my own desktop workstation. In the case of my desktop, the only reason developers had root was so we could kill rogue services during debug sessions gone bad.
Under no circumstances do I agree with any user installing additional software on a box. If it's needed, it gets approved and installed for everyone who needs the functionality, not by rogue users.
I do not fail; I succeed at finding out what does not work.
There should be absolutely no reason that a user should need to sudo to change permissions, copy an move files, etc. That's something that should be done explicitly by the systes administrator.
We're currently setting up a Beowulf cluster and my job is to manage the queues, setup the resource management, and tune the scheduler to optimize the performace.
I've never seen a situation where anyone has needed to change ownership of a file except for where someone departs. De rigeur, you put in a request to the admin to chmod all files under that user id to g+r and directories g+rx. That's it. Anyone in the person's department can then copy out whatever they need.
Install software? We simply provide the software with instructions, and a log of installation on another machine -- or a binary RPM -- to the admin wit a request to install it. It's not like we install applications every day. This is doubly important in a Beowulf cluster since you need to sync the software amongst the compute nodes.
No, if you find yourself wanting root access for such things, then you are doing something seriously wrong.
Why not just keep Solaris (10) and setup your environment using adjoining clusters that you could safely delegate some [zone] "root" access to if required? The RBAC is also very good and would likely accomplish the same goals.
I run into the same problem at my job, PHP programming and some system administration. My job would be much easier if they gave me the root password. Currently, whenever I need the permissions on a file changed, I have to ask the "sysadmin" (I do more system administration that he does) to login as root and change them. Not to mention that I write some scripts and run them on live sites, I have to ask my boss to login as root on my computer so I can write the scripts.
Their reasoning behind not giving me the password is that they are very secure about who has access and who doesn't. So, the workaround I've come up with, I just leave an SSH session running with a root account logged in. They know I do that and they called that a good idea when I told them. I don't get people sometimes.
Are you telling me that you don't see the connection between government and laughing at people? - Interviewer
I'm a long time contractor, run Solaris, Tru64, FreeBSD & Linux at home and typically dictate system admin policies. I do NOT have root access at work. At one job I threatened to write and run a program to change the root password to a random string if anyone tried to give me root access.
/usr/local (or /tools ) 1777. I maintained a large collection of open source software for 3 platforms as a spare time activity that way. Whenever I needed a package, I compiled and installed for all 3 in succession. My current shop is too screwed up to make that worth doing (i.e the security managers don't understand the concept), so I just build for ${HOME}/${ARCH} when I need something.
The fact that you asked the question is sufficient grounds for refusing to give you privileges.
The correct answer is appropriate system policy, for example, make
If you *reallY* need to change ownerships often you need to examine your premises. You're doing something wrong.
Otherwise you do *not* need root access. I *do* have sudo privileges to mount USB drives on a Linux box. The senior admin and I consider that a botch by a junior admin that isn't worth the trouble of fixing.
In short, focus on getting appropriate policies established. Root privileges are just a dangerous band-aid.
Thanks to everyone that replied - I expected most of the "You will never ever ever ever ever need root, if you need it you suck!!!" posts. Glad to know that /. doesn't change over the years. :)
/.ers. :) I've never touched a Microsoft certification nor book, and at one time was working on getting my CCIE. Yes - I am just as clueless as the rest of us, but I at least used Netscape .99, learned Linux using Slackware with the 1.1.5 kernel on a 486 DX 100 (that was my news server), and got a overall 98 on the RHCE exam. If none of that means anything then cool - no big. :)
:)
Ok - to the clarifications.
First, our admins are for the most part clueless. One in the entire group has a clue, and he's the new guy.
Two - I am experienced but don't consider myself anywhere near an expert. I know I don't know everything and admit to much ignorance on Linux and Solaris. I don't like to mention them, but I'm an RHCE and a SCSA for Solaris 2.5. I can't give too many details because I know our IT guys are avid
Three - our environment is one of the most broken-in-the-name-of-security-through-obscurity networks ever. They don't even allow ICMP because of their security "mindset". I can't friggin ping my own servers to check to see if they're up. Yes - I know about opening a socket blah blah blah.
Four - The distro they chose is an offshoot of Redhat (remember, I am trying not to give TOO many details - I do value my job). Most of our Linux desktops are EM64T or x86-64. The problem is when we need to use 32-bit apps. The current distro is quite shy of most 32-bit libraries. Yes - I use LD_LIBRARY_PATH. Yes - I compile / use --prefix with configure to send it to a filesystem I actually have privileges for.
So - that's my background. The main need for sudo access is for changing file permissions on stuff I don't own, is completely wrong for our current standard (wrong groups, etc), and is usually in the wrong place. I do NOT want sudo / root on a production system (the cluster, for example). I am speaking of having it on my Linux workstation and the numerical modelers' workstations. Have I written a stupid set of C++ that looked for a specific library in a specific path? Sure - but I $#%^#$ed that up years ago. The main point I was looking for and admittedly screwed up in not specifying well was do you allow developers sudo on their personal workstation? If so, do you have problems. If not, why?
Yeech - I'll have to submit that later. Good discussion though.
And here is your new pager. You are now on call for anything that may go wrong on the system.
If you need to keep a ton of people "in line" on a UNIX system your only real choice is to ACL up all the files they access.
||| I still can't believe Parkay's not butter.
Similarly, giving a Unix user the ability to execute mv or chmod (or quite a variety of other single commands) as root is functionally equivalent to giving that user full root access.
Even if all the authorized users can be trusted not to abuse the power, can anyone be sure they will protect their password (or other access token) so well that no intruder will ever use their account? I think not.
"But all your emitter and collector are belong to me!"
It's the same thing as Firearms....if everybody was REQUIRED to keep a loaded firearm on them at all times (and required to pass a course to use it), everybody would be a LOT nicer to each other.
Knowing that everybody has root means that if you screw up someone else....provided you have'nt rm -rf'd / you can go screw them up! (yea! baby!). If if they did rm -rf / well....then you can get together with your pals, pull out your firearms and shoot the bastard!
In our environment we were given a few rights like more, ls, tail. I manage a propriatary package for IP address space management that is installed as root. All the config and log files, startup/shutdown/management scripts are owned by root. My coworkers and I kept running into walls in the course of doing our daily work. Eventaully I just asked for sudo rights to vi so I could at least edit config files. Everything has been dandy since then.
This is good advice on any platform... mod parent up!
Who did what now?
Why would a user need root access? What files do they need to change permissions/ownership on that they do not already own? If a user can read a file they can make their own copy and do whatever with it. Any user can install any worthwhile application into their own userspace (usually, always if source code is available...go FOSS!) without interfering with any other person's files. I want Firefox 1.5 beta? I can download the tar and run it without installing anything. Does anybody else on the box suffer from my poor administration of that browser? Of course not. I want to compile? Everybody has access to gcc. I want to change my path? Of course I can change mine and even make it permanent by manipulating the files I OWN in my own home directory. I want to catch a virus? Who cares. Nobody else on the box will suffer from that unless the virus takes the entire processor and, in that case, a real admin with root can kill my process, my user, and me for being stupid. I want to spy on other people's work? No. A worm from my Exchange account wants to access a low-order port to spread (running through CrossOver or something, I presume, since we're on a secure OS here)? NO. A virus/worm wants to manipulate system files? NO. Malware wants to install and track usage on the server? Maybe just for my user (punishment for being stupid) but certainly not for the entire system. Again, NO.
So what the users always claim is that they know this application or change is for the good of the World. Firefox 1.5 is officially out so we need to make it available for everybody. The simple response is as follows:
Changes to the World should be done by a deity. root == deity. johndoe != deity. If what johndoe actually proposes is correct that should be done in test and then implemented (by deity) on the production system. Have a policy in place that you can refer to that states that everything must go through testing before going in production. Users do not, ever, at all, need any kind of unlimited root-ish power on any box except maybe their workstation that you can re-image in 20 minutes when they hose it. It's the admin's job to administer/administrate/whatever. It's their job to program little apps. Let them do that, you do your job and keep them from trying to do yours.
If you bomb my server, I'm going to make sure you never have access to anything, ever.
The original article asked the question...
How to keep those developers in line? Establish a policy...
If you get out of line, you'll end up on a Windows box!
The price of freedom is eternal litigation.
I would never let a developer have any kind of admin access to anything. They're just over-glorified users who think they know what they're doing. Being a developer does not make you an IT person, despite what management thinks. The reason you're so locked down is because you know just enough to be REALLY dangerous.
Which is more painful? Going to work or gouging your eye out with a spoon? Find out!
http://www.workorspoon.com
I once had a friend convince me that there was no way that the system would allow me to run back in my history and execute a command as damaging as:
>rm -rf *
He told me that it would clearly go back and execute the command for rebooting that I had done earlier. The look of horror on his face when it started deleting files was priceless, particularly since I had just cd'd to the root directory.
But all was not lost, as soon as it got to the rm command in the bin directory it stopped. I have since hardlinked rm to 'a' on the root directory.
To address the article's question, groups solve more than just file permissions; consider an environment in which users in the admin group have the ability to do things (via sudo) as the admin user, who owns /usr/local and all of its children. This lets priviledged users install things, but prevents them from accidentally messing with them (the admin group should not have write access to /usr/local, so sudo is required).
A more restricted implementation would chown /usr/local/stow to the admin user and grant the admin group sudo access as the admin user plus sudo access to the stow command (or perhaps a shell script that ensures items are stowed to /usr/local).
Of course, /usr/local is only one potential target. Perhaps your environment is better suited for /arch/beta or /opt. Also note that this idea is easily abstracted and applicable to other tasks.
Use my userscript to add story images to Slashdot. There's no going back.
Milo thought for a second. Superuser in AOS/VS was equivalent to root access on a Unix system, and a superuser account can delete anything and everything.
"Okay, Helen," he replied, "you're a super user!"
Placated, Helen went on about her business. Milo didn't have us change anything about her account, and she never raised the issue again.
"Who controls the past controls the future. Who controls the present controls the past." -- George Orwell
If you can chmod or cp as root, you can do anything else as root seconds later.
We only give somebody root ability to do something if it's essential to their job, and a team reviews any new application of that to ensure it doesn't facilitate unwanted privilege escalation.
Their basic access to a system at all is reviewed quarterly by their manager, and if he doesn't take action to change the default answer to "yes, they still need this access", they get deleted.
Show me a publicly-traded company that's not acting like that, and I'll show you the next Enron.
I'd really like to see a business report on the global cost of security measures. I.e. all the forgotten passwords, all the time wasted figuring out that some security measure was silently put in place, all the scrutinizing of systems & code, all the new wonderous fix it products, all the infestations of viri and other crud of the net, all the heavy retro fixes (ever fixed up a TCP/IP stack?)...
Seriously, I suspect the cost out weighs the cost of a breach; if not locally, then globally. The fact is that the paranoid world of security eats up an insidious amount of resources.
Unfortunately, it's a cat & mouse game where one leads to the other; i.e. a bad apple leads to more security, and more security challenges a bad apple...
So do you also implicitly agree to support anything the users want to have installed?
Our Solaris sysadmins have a better (IMO) policy on our development servers:
(1) They will install software packages on request if a few users have a legitimate need or if it's otherwise considered to be really important for a product/project.
(2) If you, as a user, want to install something nonstandard, go ahead and figure out how to do it, but you have to support it yourself. I've done this with tools like mc, DDD, vim, and a number of other utilities I consider useful.
(3) Software installed by individual users will be removed if it causes any issues.
That's for DEV boxes, though. QA and Production servers are locked down tight, and only #1 applies, but they tend to be extremely fussy about what is allowed (almost nothing).
Mainframe/UNIX Bit Twiddler and long time Windows/Linux Hobbyist.
The Theorem Theorem: If If, Then Then.
I mean, either they're in the same group, at least, as the file they need to chmod, or they're not. If they really *should* be able to, then someone's got the environment screwed up, and it's putting ownership and permissions on files incorrectly.
In either case, they don't need sudo. I give only certain selected users sudo; normally, the team lead, or senior tech person, etc, and that's only if they really *do* need it.
mark
You are as much an ex-unix admin as I am the queen of scots!
End users do not get sudo access! and they don't need it to
run any of those commands. It sounds to me like you have no
business dealing with a secure environment.
I like the principle that only admins have admin access and developers have exactly the access they need to do their jobs, but how often does it work out that way (besides in a well-run VMS environment)? Sys Admins seem to be just as understaffed and under trained as anyone else. I needed root access because someone needed to do their job. Since they were my machines, my apps, and my 24x7 support hassles, I made sure they were set up and maintained correctly regardless of any obstructions. I even volunteered as temporary DBA for four weeks since that was the only way to get changes done to a database that was dedicated to my app but I wasn't allowed to make and the DBA "didn't have the time". Fine, I'll do your job too and help out the other developers while I'm at it. If you want to restrict my access, you first need to make sure I have enough access to do my job, then you need to make sure you do your job. Of course you're always free to take my pager and my 3am support calls.
I wonder, especially as Debian and Ubuntu become more popular: How much would users' desire for sudo access go away if apt / dpkg had the ability to install software for just the current user (and thus didn't require root)?
I know that in a home environment (such as if I'm setting up my parents' computer), I'd be a lot more comfortable having them use a version of Synaptic that installed software just for the current user. That would basically eliminate the need for them to have root access at all. Maybe a similar thing holds true even for most developers.
Granted people can usually install software for themselves by compiling the source code, but to require that is to basically ignore all of the benefits that apt / Synaptic offer.
(If you're a Gentoo, I think the same point can be made by using a find/replace on the terms apt/dpkg/synaptic.)
Hire competent SAs. I am one and happen to administer such a system where the application team have no root access. They tell us what to do, we do it.
Easy really. Oh yes, pay them some ENglish classes, brng them to your country for one month so they become more profficient. There are solutions for all your problems.
2nd point: ensure you have a proper problem tracking software (it could be something as simple as a Wiki). FInd problem, document it on the problem tracking application, call the guy tht has to solve the problem. All this conferencing sounds a lot about tumping chest competition and less about solving the problems given the legal and auditorial limitations nowadays (thanks Enron).
IANAL but write like a drunk one.
That is it really.
Do you want some degree of accountability for what is going on on the systems?(desktops included, many around here are quite cavalier about those when they have the potential to create as much havoc as a server).
Yes? Good, then only SAs get root. No exceptions.
IANAL but write like a drunk one.
You are correct, the name is indeed Trusted Solaris, my mistake.
And yes, I am aware that Linux has achieved PL4+. My posts are not intended to be negative about Linux' capabilities. My posts are intended to point out that some of the reasoning presented by the original poster is flawed.
I'm still pissed that Windows accounts need to be part of the Administrator group to get anything done. Sure, you _could_ create a second local user not on the domain to install things locally, but Windows doesn't exactly make it easy to switch users. Folks don't want to close everything they're working on down just to install a simple little app that they need... Sure, you could _also_ "Run as..." and pick the local account, but even that seems to have issues sometimes with permissions -- which seem to only be useful for making things complicated in Windows since they're never really used correctly and most of the time end up being turned off to make things easy. Can you say "Share everything to everyone and let everyone have Full Control"? And explaining these kinds of "tricks" to users? Don't even get me started. Basically, with Windows, ease-of-use has won out over security, although some might even argue that there was never really a battle between the two. People don't want to be annoyed, which still perplexes me that Windows is the de-facto choice since I find it nothing but annoying.
/gamlidek/
P.S. -- I happily converted to OS X after a decade of linux use.
"In theory, theory and practice are the same; in practice, they are not."
Groups can do lots of useful things -- but if you use groups with a User Private Group scheme (like RedHat's) and delegated group administration (groupmod -A on some systems) then they really take off.
Whoops, of course that should be |s/groupmod -A/gpasswd -A/
As anyone knows, in any *nix systems, a user is usually the "root" of its own user directory. He can use this priviledge to install there softwares and services with a minimum of hack. If he's mean, he will even be able to compete the sysadmins by making his self-installed softwares available to other users. On the edge, a talented programmer can even install a virtual OS in it's user directory and manage it as he see fit. Even Windows have (a bit) more control over this.
Here at work, our AIX administrators are not very interested in their administration tasks. All they want is to give us a minimal interface with a minimal set of programs for them to maintain. In a way, I don't blame them. But I sometime need to have softwares not necessarly critical and that I'll be the only one to use. Since I know they wont want to spend time on that, I download and compile them myself and install them in my home directory (which provides $USER/bin, $USER/lib, $USER/share, $USER/var, etc.)
For this reason, I harldy see the reason why I should be root on a machine, unless maybe it's an unshared workstation or unless it's my home FreeBSD server ;-)
If you're an admin, do you allow your users basic SUDO rights like chmod, cp, mv, etc...
/usr/bin/date (or whatever). Or even better, I'll write a script, use sudo to chown it to root, then use sudo to chmod it to 4777 (I assume "etc..." would include chmod). Woo hoo! I can do anything I want on the system. In general, chown and chmod are very bad things to sudo!
That's a bad idea. So I'm a user, I guess I'll just write a script, use sudo to change the ownship of the script to root, then use sudo to cp it to
Also, having the responsibily of root is a bad idea if you don't know what you're doing (unless you really don't care about your job). Not to mention, the person who screwed up the system is not the admin; I am. So I'm the one that's responsible for fixing whatever the user with root access breaks.
eMelody Web Directory add your site today!
I've work where developers assumed the programs they developed were run as root. Any attempt to correct this is a huge battle.
/usr/local/sudo/some_script. They can view the script to see what it does. They can't modify it, etc. After awhile, some are convinced they really don't need root.
How do you force those developers to develop programs that run as a regular user?
I'm currently using sudo
On previous systems they ran sudo logging_script that was basically sudo su with a wrapper that logged all keystrokes so we could find mistakes. One user installed a package on the wrong system & wiped a bunch of things out with it.
I'm a windows admin and I take the full view that 'I IS GOD' everyone else (including my other personality) is a user.
:-( I try and explain that NO one person or application is more important than the network and the business that the network supports.
When I first started where I am, the IT staff had domain admin accounts - that is me as me was a domain administrator, I didn't need to login as administrator to change someone's password, when I was writing something up in word I was a domain admin ('great' for changing the word global template). That was soon changed. Now there is me as 'pleb' and me as 'god', helps with the separation of roles (of course with terminal server, I have a session of a me as god running behind me as pleb). This model is critical in a environment where there is a 'communal' resource such as a terminal server or networked/shared applications - you can't have random people dicking around with them.
Sure it means that some people get upset that they can't do things (don't get me started on people wanting to install a new browser because some website was badly designed). I as pleb have the same issues that they do, I as god doesn't do things like open word documents or browse web sites. Of course there are also some applications that think they need write access into silly places like the root of c: or want to keep the data in the same place as the application
I even have my home machines setup in the similar fashion (I'm going to have to logout as me soon to update gimp, winamp and windows). I suggest to people when I help with their home machines that a similar security model is the safest thing, some think it is a good idea, some get sick of not being able to install any old 'junk' whenever they download it - I don't work with their machine a second time.
I get accused of being a control freak, but to be honest I don't give a shit because it balances out - at other times they tell me that the horror stories they hear of other networks don't seem to happen where I am (touch wood, throw salt over the shoulder, cross fingers, sacrifice a goat etc)
I agree with the general sentiment -- programmers who aren't curious and who don't like to take things apart (either literally or figuratively) tend to be poor programmers, and people who lack even a basic sense of curiosity about their development environment will generally fail to learn much more about it than the minimum amount required to do their jobs.
:-)
:-(
I've worked with many of those people over the years, and it can be frustrating.
However, I'm not sure that maintaining one's own box is a valid measurement except in those cases where it actually means something.
I've held four corporate software development/support positions over the past 17+ years, and I've never had a box under my own control that was even remotely similar architecturally to the machine/environment on which I was doing software development and support.
People aren't generally given their own mainframes or their own Sun boxes in the corporate environments I've been a part of -- instead, they use their own local Mac or PC to access a centrally-administered development hardware.
On the other hand, I also tend to learn about and hack whatever I can both at work and at home, which is why I have my own custom editor and various other utilities in the mainframe environment here, why I'm wandering out and bringing in various utilities to try to make my life under Solaris easier and more efficient, and why I'm constantly asking questions of the systems support people that they often can't answer. Too many people are content to use the default/minimal toolsets, and while that often works quite well, there are times when those tools really suck compared to stuff other sites have developed and are actively using.
The software development world is a series of isolated ponds, and too many people are content to play in the shallows when there are *boats* sailing around out there...
Mainframe/UNIX Bit Twiddler and long time Windows/Linux Hobbyist.
The Theorem Theorem: If If, Then Then.
For each application to be run, create a zone
or virtual machine to run only that application,
give it a directory tree from a shared NFS or
cluster server, and give the aplication admin
the ability to su to root in that zone.
She can then grant sudo rights to developers
when a reinstallation or bug-fix is needed,
but not affect anyone else.
In addition, in a beowulf-like array, one
can put clones of the zone on all the machines
where you want to provision the app, and use
the master copy for acceptance testings before
rolling it out to one node after another.
A roll-out tool that can do change reports
is a good extra to throw in here.
--dave
davecb@spamcop.net
Please... Why would I want a User Private Group? That's what usernames are for. Delegated group administration == good; UPG == gid pollution.
Hm, sudo access to chmod?
/usr/bin/vi /usr/sbin/visudo
/etc/sudoers ~/ /etc/sudoers
$ sudo chmod u+s
$ sudo chmod u+s
$ visudo
Seems like a bad idea. Or, even less detectable if I also had sudo access to cp/mv:
$ sudo cp -p
$ sudo chmod a+rw ~/sudoers
$ vi ~/sudoers
$ sudo chmod 110 ~/sudoers
$ sudo mv -p ~/sudoers
We may not imagine how our lives could be more frustrating and complex—but Congress can. – Cullen Hightower
Fixes the one weakness in sudo (lack of logging on root shells) that people have been complaining about for years. Log everything that happens in a root shell (sudo -s, sudo /bin/bash, etc.), including keystrokes within editor sessions, as well as timing information (exactly when and how quickly things were typed), and playback recorded sessions later. My favorite use of sudosh is to do something particularly complicated within sudosh so that it's recorded, and then tell junior admins to go replay the session to see what I did, and in what order.
Ironically, the only system it doesn't seem to compile on yet is OpenBSD (possibly Free and Net as well; haven't checked) - although I hear Todd Miller may be planning to incorporate the sudosh functionality into the sudo code tree.
illum oportet crescere me autem minui
Accidents happen but disasters are made. So get good protocols in place that prevent accidents from turning into disasters.
Simple example, config files for the server. Apache especially can be nasty.
A: Document every change, put the configs in a CVS like system and make sure it clear that nobody can just alter the file.
B: Split it (the firewall idea) into logic parts so that your carefully tuned thread settings are not in the same file as the far more often changed virtual host settings.
C: make sure the editor in question automatically makes backups. So even if the user accidently deletes the contents all will not be lossed.
Now it should be virtually impossible to accidently loose the apache config (wich I have seen happen). Good people do make mistakes but they know how to recover from them.
Perhaps I worded it wrong. I am sure there is some famous quote that says it all.
MMO Quests are like orgasms:
You may solo them, I prefer them in a group.
a stampede at the patent office.
my password really is 'stinkypants'
The two things you listed you don't need root for.
1) get a file ownership changed
Either you should own the file (because an employee quit for example) in which case the problem needs to be addressed for many files or its specific to this one. If it is specific than
read the file and make a local copy.
2) a specific package installed.
Install to your home directory and share it out. Programs that are shared out that lots of people use will get installed and managed centrally.
> ...they don't allow users even low-level SUDO access, to do silly things like ,so I understand their perspective and wish to keep
> change file permissions or ownerships, in a tracked environment. I am an
> ex-*NIX admin myself
> control over the environment, but as a user, I'm frustrated by having to
> frequently call the help-desk just to get a file ownership changed or a
> specific package installed.
You already have some replies on the file ownership issue. I suspect if you provide more details, people can give you more tips.
But why do you need packages installed? In a controlled environment, you would normally be working with the versions of various packages that are ordinarily provided, plus a core set of additional packages for development. The only exception I would see to this is if you are doing exploratory analysis of various development tools. In a situation like that, I'd suggest a smaller, separate network for this testing, on which you may have elevated permissions.