Slashdot Mirror


How Would You Distribute Root Access?

dhanks asks: "I'm one of 10 administrators in our group. We're equally responsible for about 300 UNIX servers. We're having problems keeping track of all the root passwords and some of the administrators have taken it upon themselves to implement different security standards. (sudo with silly !SHELLS restrictions) How do other companies and system administrators handle the distribution of root access? I've been charged with coming up with a security policy and I would like to receive some feedback. I'm currently thinking of personal root accounts that would be locked via the /etc/passwd and would only be accessible via 'sudo su - adm_userid' that way each administrator may have full root access only using his regular user password instead of having to keep track of root passwords." While this is similar to an earlier question, this question deals with insuring authorized administrators have the access they need. How would you distribute root over hundreds of Unix machines to the administrators that need it?

148 comments

  1. I would combine them. by Anonymous Coward · · Score: 5, Funny

    First, create one super administrator from the 10 (sorta like Voltron).

    Second, create one giant supercomputer cluster from the 300 machines.

    Third, give your new super administrator root access (with their choice of password) on the new supercomputer.

    1. Re:I would combine them. by peragrin · · Score: 1

      My question is how many geeks here are old enough to know Voltron?
      My second question would be is who would win Voltron or any one of the Power Ranger Ripoffs?
      My third question is can I use that supercluster to boost my folding@home scores???

      --
      i thought once I was found, but it was only a dream.
    2. Re:I would combine them. by Anonymous Coward · · Score: 0

      I'm in my mid-20's, and I watched Voltron, had the action figure, etc.
      That would depend on which Voltron we're discussing. Car Voltron or Lion Voltron?
      Yes, although I'd use it to compile Gentoo.

    3. Re:I would combine them. by CodeMonkey4Hire · · Score: 1

      (1) Me (26).
      (2) Voltron. I'm afraid my reasons would be flamebait.
      (3) *Consults Magic 8-ball* "Very Doubtful"

      --

      Let's go Hurricanes!!! 2006 Stanley Cup Champions!!!
    4. Re:I would combine them. by peragrin · · Score: 1

      Your reasons are only flamebait to the high schoolers that troll :-). My magic 8 Ball reading said "It is So"

      maybe I'm just special.

      --
      i thought once I was found, but it was only a dream.
  2. In times past.... by revmoo · · Score: 3, Informative

    ..I just made them a root-user which was typically nick-root, that way things could be more easily tracked, etc. Works pretty well.

    --
    I would expect such blatant racism on Fark, but on Slashdot? Mods please ban this asshole.
    1. Re:In times past.... by secolactico · · Score: 1

      I just made them a root-user which was typically nick-root

      That would be the reason why Nick was fired after the last time the system went down... ... but seriously... if the have root access, can't they create themselves additional root accounts, tamper with system logs, etc?

      --
      No sig
    2. Re:In times past.... by Anonymous Coward · · Score: 0

      Yes. But if you don't trust somebody with root access, why did you hire them as a sysadmin in the first place?

    3. Re:In times past.... by Anonymous Coward · · Score: 0

      not all that shiens is gold

    4. Re:In times past.... by KDan · · Score: 2, Funny

      That's far too complex! The obvious solution is to give all the boxes the same root password, kept in a central location (such as on a postit note at the entrance of the server room).

      Daniel

      --
      Carpe Diem
    5. Re:In times past.... by Anonymous Coward · · Score: 1, Funny
      Shurely that's:

      Not all those chiens are dogs

    6. Re:In times past.... by formfeed · · Score: 1

      You apparently never thought about security! Passwords are either kept under the keyboard, the mouse pad, or if you want to make it really secure you stick the postit note under the table.

  3. use cpp and sudo by Anonymous Coward · · Score: 1, Interesting

    You should have one big global sudoers file which is able to get preprocessed by cpp or m4. Then simply output the preprocessed file on a per-server basis.
    You can even use sudo's built-in mechanism between differentiating hosts.
    You will get very fine-grained control, as different people will have different access through just running the preprocessor.

  4. Sudo and CVS by JofCoRe · · Score: 4, Interesting

    I keep track of system changes on our linux servers using sudo and CVS. Admittedly, my situation is on a much smaller scale (2 admins, handful of systems). I like to use sudo because then any command that's run as root is traceable back to who did it via the system logs. (of course someone could hide their tracks by editing the logs...) I trust the other admin here, but in the past, I've set up sudo so that people could NOT USE the su command. The reason I did this is so that someone couldn't do a sudo su -, and then do whatever they want as root, unlogged. There are still workarounds, as sudo is not a be-all-end-all of security. You still need standard procedures, and you have to make sure people follow them.

    As for the CVS side of things, I just keep a "sysconf" module for each server. Whenever I make any changes to a system file, I will first add it into CVS. Then all subsequent changes are made to the CVS version'd file, and notes and stuff committed to CVS. After committing to CVS, the admin then moves the file into the proper system location and does whatever else is neccessary to make the changes take effect. Once again, it doesn't work unless people use it. There's nothing I have in place that would keep someone from editing the file in the system location (since they need root to put the file into place...), but I try to discourage people from doing that.

    Eventually I'd like to write some scripts and a DB backend that will hold the locations of all the files, so it's easier to move them into the proper location. But I haven't started that yet...

    --

    Place sig here.
    1. Re:Sudo and CVS by Elwood+P+Dowd · · Score: 3, Funny
      The reason I did this is so that someone couldn't do a sudo su -, and then do whatever they want as root, unlogged. There are still workarounds, as sudo is not a be-all-end-all of security. You still need standard procedures, and you have to make sure people follow them.
      sudo bash
      C'mon, man. That's not exactly a "workaround."
      --

      There are no trails. There are no trees out here.
    2. Re:Sudo and CVS by o1d5ch001 · · Score: 3, Informative

      I co-administrate a number of solaris machines and have created a bastion-host environment that forces all users to use the bastion and then work from there using a fake root account that uses sudo. The only password an admin needs is his own on the bastion host, sudo and ssh keys do the heavy lifting and everything gets logged. As an admin, I do not know the root password, and I like it that way.

      Every action I take as root is logged through the sudo facitlity to a central logging server. Users who need role accounts and such log in through the bastion host and a number of sudo scripts log them in through ssh into the account. Its not a perfect system, but when admins leave, there is only one password to change and root is locked up in a cabinet on that odd chance that you need to do fsck (which the only time that I have found that I need the actual root password).

      --
      Q. What is Calvin's monster snowman called? A. The Torment Of Existence Weighed Against The Horror of Non Being
    3. Re:Sudo and CVS by Fred+Nerk · · Score: 1
      The reason I did this is so that someone couldn't do a sudo su -, and then do whatever they want as root, unlogged

      sudu bash

      --
      Anything is possible, except skiing through revolving doors.
    4. Re:Sudo and CVS by jmt9581 · · Score: 1

      Good call. Another one is 'sudo vim', where a quick :sh command will drop you into a root shell.

      --

      My blog

    5. Re:Sudo and CVS by ptudor · · Score: 1

      You can patch bash/tcsh to log all actions to syslog. It can be quite useful as a supplement to sudo's logs.

    6. Re:Sudo and CVS by innosent · · Score: 2, Interesting

      Expanding on this idea, why not patch bash to log all actions by users with uid 0, then create an account for each admin with uid 0. On some OSs, this may also require a kernel patch to hold the username as well as the uid, since I know that Linux used to store only the uid, and uses that to lookup the username (which will then resolve to the first matching entry), and do not know if this is still the case. If possible, you could also consider using and admin group (like wheel), but this may not be enough to get the job done.

      --
      --That's the point of being root, you can do anything you want, even if it's stupid.
    7. Re:Sudo and CVS by Elwood+P+Dowd · · Score: 4, Insightful
      Ok, ok. You convinced me. A workaround is needed:
      sudo wget http://ftp.gnu.org/gnu/bash/bash-2.05b.tar.gz
      sud o tar zxf bash-2.05b.tar.gz
      cd bash-2.05b
      sudo configure;make;./bash
      Here's a hint: If you are a trusted user, then you can create a process that will do all the things you desire without logging. You could patch the OS and log system calls, but they could patch the OS and fix your logs.

      If you do not trust a user, then do not make them a trusted user. Leastaways don't make them a trusted user on the machine that is supposedly logging their actions.
      --

      There are no trails. There are no trees out here.
    8. Re:Sudo and CVS by phaze3000 · · Score: 2, Insightful
      Except that with sudo access anyone with sudo access could easily get hold of /etc/shadow and then crack the root password. Create a shell script with an innocuous sounding name which grabs /etc/shadow, run it via sudo - all you're going to see is the user with sudo access has run a script.

      I'd therefore recommend you change the actual root password when anyone who had sudo access leaves.

      --
      Blaming GW Bush for the Iraq war is like blaming Ronald McDonald for the poor quality of food.
    9. Re:Sudo and CVS by mwa · · Score: 2, Interesting
      That's close to what I did. The patch makes a static bash run setuid 0 and logs via syslog everything they enter exactly as if they where running with set -x. (It used to log the output as well, but it makes for very messy logs if you trap screen oriented stuff like vi sessions, etc. Knowing who editted a file and when has been sufficient for isolating blame^W accountability.) It also requires the userids, from and to, be defined in a secure file (chmod 0, owned root:root). It logs what user called it, and what uid they switched to (I also use it to allow users to switch to non-root uids so it can be used for DB/application "admin" IDs as well) and the session begin and end times.

      Since it uses syslog, log entries are sent to a remote machine in real time.

      Before anyone says it, I will: This is a security hole by design. It grants full root access with no restrictions, BUT, a) everything is logged, b) it can only be used by people who really need root anyway, c) we've got an audit trail, and d) no need to communicate root passwords out-of-band (e.g. email, voice, etc.) where they can be sniffed or overheard. Plus, if anyone leaves or abuses it, they get pulled from the config and no need to change the root passwords. The point is not to prevent people from doing things, but to let them do what needs to be done with accountability.

      Since implementing this, no one knows the root passwords on our machines. They are set to very strong password and kept sealed in an signed envelope in a lock box at the data center. If they are set strong enough, even the person who sets it forgets it after a short while.

    10. Re:Sudo and CVS by JofCoRe · · Score: 1

      If you do not trust a user, then do not make them a trusted user. Leastaways don't make them a trusted user on the machine that is supposedly logging their actions.

      That's pretty much what I was getting at... despite whatever sort of measures you put in place w/sudo or whatever, you still have to trust the people that you give root access :)

      --

      Place sig here.
    11. Re:Sudo and CVS by Anonymous Coward · · Score: 0

      But presumably you've made sure that nobody but you can ever acquire the ability to modify the logs that have already been written, and you've also made it a condition of their privileged status (and probably their job too) that they don't try to get round the logging. You now have evidence in your log that they've broken that condition. So they get the sack.

      Where's the problem?

    12. Re:Sudo and CVS by Elwood+P+Dowd · · Score: 1
      Ok, so
      sudo vim <some executable /etc file>
      then put all your nasty stuff in there. Then
      !/etc/<some executable /etc file>
      from inside vim. The right answer is the one that oneiros27 pointed out: semi-trusted users should only get access to a very select few executables via the sudoers file.

      The logging answer is close to what you say: log keystrokes, and don't do it on a machine that they have access to. Like o1d5ch001 pointed out. Both of their posts get at the issue with simply firing someone for evading logs: Firing them isn't your only goal. It's also figuring out how they buggered your system and how to get it back.
      --

      There are no trails. There are no trees out here.
    13. Re:Sudo and CVS by macdaddy · · Score: 1

      I have a root-level user (uid 0) for each of my admins. Works ok. Could be better. I've also written a simple wrapper around our CLI text editors like vi (bleah!), joe (ewww), and pico (don't laugh!) to stuff the changes into RCS with a copy of $LOGNAME and a timestamp as comments. It works pretty well. That way I can tell which admin ran chmod -R 720 .* from their personal home directory (grrrrrrr).

    14. Re:Sudo and CVS by dodobh · · Score: 1

      http://www.infrastructures.org/
      Use the tools you have.

      --
      I can throw myself at the ground, and miss.
  5. Public Keys, ACLs, and sudo by imsmith · · Score: 4, Insightful

    With that many systems, the only rational access control seems to be to be using public keys and SSH agent to deal with the logon issue. Once in the system, the only way to keep track of so many cooks in the kitchen is to have sudo running and logging sysadmin actions. Finally, if there are specific files or groups of files that need special attention, I'd probably use ACLs to control access. Another thing that seems like a pain in the ass until it saves you is RCS. Especially with so many admins, being able to roll back a config change quickly is a lifesaver.

    1. Re:Public Keys, ACLs, and sudo by Just+Some+Guy · · Score: 1
      I fully agree, except that I think this is a strong case for SSH with Kerberos authentication. If you fire a sysadmin, the last thing you want to have to do is to de-authorize them from several hundred machines where they have root access. A centralized authentication system could provide a big payoff in this setup.

      Also, I'd pick Subversion (or even CVS) over RCS, since you can create a central server to store all configuration information for every machine. This is extremely nice when you want to clone one the setup of one of your servers to try a clean install of a new version of one of your applications.

      --
      Dewey, what part of this looks like authorities should be involved?
  6. What about key-based SSH authentication? by DocSnyder · · Score: 5, Insightful
    Every admin can generate his SSH key pair and have the public key appended to /root/.ssh/authorized_keys. Maybe the private keys could be stored on a USB stick or a chip card for better security. They should be protected by key-specific passwords, too.

    So nobody would get in touch with actual root passwords, which can be stored at a safe place.

    1. Re:What about key-based SSH authentication? by Anonymous Coward · · Score: 0

      I have worked in a company using a very similar method, with a similar number of machines and admins to the OP.

      More specifically the bosses machine pushed out the ssh keys on an hourly basis via rsh.
      This way no rouge admin could add/remove/modify the authorised keys for more than an hour, and leavers/starters were handled in the same timeframe.

    2. Re:What about key-based SSH authentication? by rimu+guy · · Score: 2, Insightful

      Of course even one hour's root access is enough to enable the user to add their own back doors (e.g. other user accounts). So you'd also need to monitor things like /etc/passwd and shadow file changes carefully. And tools like Chkrootkit can help.

      But definitely, ssh public/private key authentication is the way to go.

      - Linux VPS Hosting

    3. Re:What about key-based SSH authentication? by GigsVT · · Score: 1

      If you don't trust your own system administrators, then what's the point? You might as well go home now.

      --
      I've had enough abrasive sigs. Kittens are cute and fuzzy.
  7. Kerberos by caseih · · Score: 3, Interesting

    In a perfect world, Kerberos is the way to go. Your kerberos ticket would, according to the access controls on each box, grant login and root privileges. SSH can pass along your ticket, granting you seamless access with your credentials.

    In practice, Kerberos is really hard to do right and so far ssh support is very weak. But if everything was kerberized (this is in the works), then everything from logins to web access can go through your ticket. Granting root privileges is merely a matter of setting the acl properly and then letting the use ksudo.

    1. Re:Kerberos by Anonymous Coward · · Score: 0

      MIT kerberos has a kerbrized su.

      I cant make it work yet.

    2. Re:Kerberos by yandros · · Score: 1

      It's probably fixed in krb5, but the krb4 ksu was crap that should never be used or installed.

  8. I'd use PAM by Anonymous Coward · · Score: 2, Insightful

    PAM, Pluggable-Authentication Modules. The PAM Radius module, with a central radius server, has worked for me in my testing, but I wish the module was a little more featureful in doing something with return attributes. It's one of those things I kept wanted to do, never had time for. A random descriptive page I found is here One minor caveat: it's moderately easy to misconfigure PAM to allow too much access - just be careful and use a standardized configuration.

    1. Re:I'd use PAM by tzanger · · Score: 1

      There's no need for a full blown PAM if you're just out to centralize logins. nsswitch was designed for this and doesn't have the bloat that PAM has. padl.com is your friend.

  9. "su" accounts by menscher · · Score: 4, Interesting
    You imply that all admins have root on all machines, and that all machines are clustered in some way. If that is the case, you might already be using YP/NIS to distribute passwords. So just give each superuser an UID0 account on your NIS master (our convention is su$NAME), and that will be distributed. If you want to limit some of their access to certain machines that can be done....

    In general, nobody should EVER type the root password, only their su$NAME password. That way, if it gets compromised (accidentally typed somewhere bad) you only have to change it in one place (NIS master) rather than on all machines.

    All of this seems pretty obvious, so let me know if there's something unusual about your setup that makes this unworkable.

    1. Re:"su" accounts by Anonymous Coward · · Score: 1, Interesting

      that's exactly what I was going to say. Just give everybody an account on NIS (or samba if you can make it work) and have them be user ID 0 on every machine they are allowed to be. Give them a regular user account also. That way everyone only has to remember two passwords and they can all get to every box.

    2. Re:"su" accounts by BinLadenMyHero · · Score: 1

      Same here.
      We have a lot of admins at our server, but only two of them have the root passwd (but don't use it). Our naming convention here is to the same username with the first letter in upper case.

    3. Re:"su" accounts by menscher · · Score: 1
      naming convention here is to the same username with the first letter in upper case

      Out of curiosity, does that play nice with sendmail? I'm trying to decide whether that's really cool because it allows mail sent to Menscher to reach me just as my normal menscher account would, or if it would suck because mail to menscher would maybe be hijacked by Menscher and dumped into /var/mail/root.

    4. Re:"su" accounts by lucas+teh+geek · · Score: 0

      "su" accounts (Score:4, Funny)

      I dont get it :/

      --
      TIAEAE!
    5. Re:"su" accounts by menscher · · Score: 1
      "su" accounts (Score:4, Funny)

      I dont get it :/

      That's because it's not supposed to be funny. It's a serious suggestion, from a real sysadmin. Unfortunately anything that doesn't involve PAM or CVS gets modded "Funny" on Slashdot.

      (It's really difficult to know whether to be happy that my post got modded up, or pissed off that it was modded funny.)

    6. Re:"su" accounts by BinLadenMyHero · · Score: 1

      email address is case insensitive, it's defined like that in the protocol specification.
      mail sent to Menscher will reach menscher.

    7. Re:"su" accounts by menscher · · Score: 1
      I know it's case insensitive in SMTP. But then the mailserver has to convert Menscher (or menscher) to a UID. If it's looking through the password file, and Menscher is near the top with UID 0 and menscher is much further down, how does it decide which to pick? I'm thinking it wouldn't be deterministic, or, if it is, that it'd always pick the first one it finds. Which is not what I'd want.

      Have you actually tried this? With which MTA?

    8. Re:"su" accounts by BinLadenMyHero · · Score: 1

      yes, i just tried before writing that.
      mta is qmail here.

  10. One Word. by mosel-saar-ruwer · · Score: 4, Interesting

    Novell Directory Service.

    Oops, that's three words. Try "eDirectory" instead.

    No, wait a second - I seem to recall that Novell marketing renamed it yet again - now it's called either Ngage, exteNd, Nsure, or Nterprise - not sure which.

    Frankly, I'm not even sure the people at Novell know what it's called anymore.

    Maybe we should moderate Redmond "+1 Has a Clue" simply for fielding a marketing team that knows its ass from a hole in the ground...

    1. Re:One Word. by Trepalium · · Score: 1

      Simpler word.. LDAP and/or Kerberos.

      --
      I used up all my sick days, so I'm calling in dead.
    2. Re:One Word. by T-Ranger · · Score: 1
      Ngage is Novell Corps consulting, training, support wing. Obviously, Novell will consult, provide training and support for eDir.
      extend is somewhere beteween a Web Portal product, a Web library... General webyness. It (can) heavily use(s) eDir.
      nsure is one "usefull" layer on top of eDir. Apps to define workflow, policies, etc etc. eDir is the database, nsure is the middleware. High level stuff using eDir as the backend.
      nterprise is (another) "usefull" layer on eDir. Or a collection of usefull layers. Looks like all relativly low level stuff.

      eDir remains eDir. It only changed its name once., and it wasent retroactive to NDS.. Though NDS/eDir version numbers are the same scale, and always increasing. (As opposed to Sun, SunOS/Solaris and their random version number scheme).

      You are confusing things that use eDirectory, both with each other, and with eDirectory itself.

    3. Re:One Word. by TheLink · · Score: 1

      Heh, maybe Novell needs you to help them explain things.

      When you're not the dominant player, not many are going to bother sifting through all the marketing bullshit and crap to figure out what your product actually is and does.

      Anyone remember HP's espeak?

      --
    4. Re:One Word. by T-Ranger · · Score: 1

      They were easily explained within the first paragraph of the pages that you get when going to http://novell.com/$THING.

  11. Normal User Accounts... by fozzmeister · · Score: 4, Informative

    ...and ssh rsa authentication in authorized_keys of root's. peice of piss.

  12. blah by byolinux · · Score: 4, Funny

    just all use the password 'secret' - nobody would ever think a root user could so dumb.

    1. Re:blah by Spoing · · Score: 1
      1. just all use the password 'secret' - nobody would ever think a root user could so dumb.

      Personally, I use 12345. It's on my luggage too!

      --
      A firewall can not protect you from yourself. Turn off what you do not need. Do not use the firewall to do your work.
    2. Re:blah by lewp · · Score: 1

      I know.

      --
      Game... blouses.
  13. Auditing.. by RedPhoenix · · Score: 3, Insightful

    You may want to consider establishing a basic auditing policy, to back up any access controls you put in place.

    Depending on what operating system you are using, you could turn on execve / set*id auditing. This functionality is available in a variety of unix implementations (BSM for Solaris, Snare for Linux, /dev/audit for AIX, Irix, Unicos, etc.).

    Alternatively, many OSs provide 'sulog' or equivalent.

    Note though, that auditing root suers is an inherently risky process, as a root user can cover their tracks quite easily by removing audit log data; as such, you might want to consider real-time forwarding of audit data to a central server, getting it off the host machine, and away from the administrative influence of the root-level user. For basic log files, this is effectively a tail -f | send across the network. For OS-level auditing, it's generally a little more complex.

    Red.

  14. "How Would You Distribute Root Access?" by fmaxwell · · Score: 3, Funny

    That's easy: With Post-it notes on monitor bezels.

    1. Re:"How Would You Distribute Root Access?" by confused+one · · Score: 1

      No. No. No. You're supposed to keep the password a secret. Stick the Post-it note to the underside of the keyboard =)

  15. Passwords by sparkie · · Score: 1, Funny

    You mean *nix has passwords now? ... And didn't microsoft patent the password?

  16. Audit Trail? sudo+sudoscript by hbo · · Score: 2, Interesting

    sudoscript preserves your audit trail in root shells. It's not perfect, (there are still ways to evade the auditing) but if your concern is to have a record of root's actions so that problem diagnoses is easier, rather than keeping malicious users from doing bad stuff, then it's useful.

    --

    "Even if you are on the right track, you'll get run over if you just sit there" - Will Rogers

  17. dealing with this as well... by orn · · Score: 5, Interesting

    I'm a user dealing with this right now. Here's what I wish they'd implement at my place.

    Give _everyone_ root access. These machines are behind a firewall, right? These are used by developers working to design/forward your company's projects right? If there's the slightest chance that they'll need root, give it to them.

    Now, how do you deal with the chaos that results?

    Simple. Write a script that reimages the drives on a regular basis. Daily, weekly, monthly, or even by command. In that way, you know the machines will always be kept up to date.

    Use your existing admins to maintain and develope the image that you push down to the client machines. Every user should know that the machines will be reimaged often and that they can't plan on the machine always being in the same state. If they have an application or library that they want to persist, then have a procedure for having one of your admins add it to the master image.

    User files should be kept on a file server elsewhere. Home directories may or may not be mounted to the machines as you like.

    Everyone deserves root. Even those people that are going to screw the system up. (Once or twice, and they won't do it again.)

    --
    1. 2.
    1. Re:dealing with this as well... by Brandybuck · · Score: 4, Insightful

      Give _everyone_ root access.

      What! You've got to be kidding me! Unless you're also requiring them to also fully administer their machines, this is one of the lamest ideas I've seen in months.

      Just because they're developers doesn't mean they're smart, competent or even computer savvy. It certainly doesn't mean that they're trustworthy.

      --
      Don't blame me, I didn't vote for either of them!
    2. Re:dealing with this as well... by Anonymous Coward · · Score: 2, Funny

      This could possibly be the most idiotic suggestion I have ever heard on Slashdot.

    3. Re:dealing with this as well... by hbo · · Score: 2, Informative
      It's not so idiotic. There are several approaches that allow everyone to have root. My sudoscript tool was written to fit into just such an environment. The audit trail was designed to allow the IT department (me) to figure out what went wrong when someone shot themselves in the foot. (See The Problem of PORCMOLSULB for more on my experiences with this.)

      SDSC uses cfengine to enforce configuration policies. Their users do have root. (I've been looking for the ;login paper that discusses how exactly they do this. It's not on Google, so it must not exist. 8) Reimaging a system works as long as you can keep a root-enabled user from storing local data, or else you don't care about the consequences of losing any such data. It's also the correct last resort if things go badly wrong.

      --

      "Even if you are on the right track, you'll get run over if you just sit there" - Will Rogers

    4. Re:dealing with this as well... by photon317 · · Score: 1


      That's why you're a user and they won't give you root.

      --
      11*43+456^2
    5. Re:dealing with this as well... by orn · · Score: 3, Interesting

      I'm not saying that the users are trustworthy. That's why you have a cron script reimage the drive regularly. It's not a last resort, it happens always.

      Look, this knocks out a bunch of issues all at once:

      1. Keeps all machines up to date with the latest everything (so long as you keep your master copy up to date).

      2. Frees up power users from having to hunt down a sysop when they want to do something unique.

      3. Keeps machines cruft free - if they're rebuilt, they're clean.

      4. You still have admins and master configurations, so non-power users won't even know the difference. They probably won't even know they have root!

      Open your mind a little. Did you trash your machine when you got root? Probably. Probably once or twice. But in so doing, you also learned how the machine worked.

      Give them a sandbox to play in and they'll build castles.

      --
      1. 2.
    6. Re:dealing with this as well... by hbo · · Score: 2, Interesting
      Varations on this theme have been tried in varying environments with varying degrees of success. So called "thin clients" can acheive a result similar to reimaging a "fat" client on a daily basis. But unless you have bandwidth to burn, downloading the system images from central servers won't scale to thousands of seats very well. Satellite servers could ease this problem, but then you have a more complex, and thus more fragile system.

      I like the idea of empowering users. I agree that giving them root will result in benefits that often won't be visible to the sysadmins, and would suprise them if they were visible. (See my paper for more.) The trouble is that the monolithic security model of Unix makes this tough. It's not just an issue of the local workstation. When you share files vi NFS in a heterogeneous envirionment, you have to deal with the fact that root can become any user he likes. Thus I can become you, and have my way with your data, even if you remap UID 0 to "nobody." If you say that there is no local data, that means that you have lots of NFS clients, and the forgoing becomes an issue.

      There are technical fixes, of course. More recent versions of NFS get around the above problem. SELinux is a good way to provide finer grained distribution of system privilege. But these solutions are not widely deployed, and besides, a real enterprise has lots of platform diversity. A half dozen different solutions exist for each problem I've mentioned. depending on the platform. Designing a security policy that has to be implemented six different ways is tough. Add in the older versions that don't offer any solution and it becomes impossible.

      Real security policies pick a model, open. closed or in-between, and just deal with the technical shortcomings as personnel issues.

      --

      "Even if you are on the right track, you'll get run over if you just sit there" - Will Rogers

    7. Re:dealing with this as well... by Gudlyf · · Score: 1
      The problem I have in my environment is that some developers want root access on the main fileserver -- where we keep user home dirs and the mainline source. There are occasions when they want to change ownership on files or directories, and they're not able to do so unless they're root (or sudo'ing chown). When someone messes up a root command there...well, there's hell to pay for them and me. It's happened more than once and sometimes the abuser simply never learns.

      One thing I've done that seems to work out quite well is chroot jails. I then allow them to sudo just the script that puts them in the chroot'ed jail, and then they're in a locked-down area to pretty much do as they please. Within that jail are the mainline source files which they can then chown to their heart's desire. The files are on a netapp with hourly snapshots, so anything really bad can be reversed quite easily.

      Imaging drives is a good idea, but it's not always an option. We have to have just about every version of Unix & Linux since about four years ago, in-house and running, for development and mostly support/bug issues with our product. I can't see how it'd be easy to image HPUX 11.0, AIX 4.3.3, Tru64 4.0F, Solaris, *insert every release of Linux here*, etc. It's just too much! And because the devs are extremely picky with NFS performance, no matter how fast you make it with existing technology, they get pretty whiney about needing to use local disk space for build areas. Although, build areas are easily recreatable so...

      --
      Trolls lurk everywhere. Mod them down.
    8. Re:dealing with this as well... by Anonymous Coward · · Score: 0

      Hey, Richard, how's the Gates Building treating you?

    9. Re:dealing with this as well... by the_womble · · Score: 1
      Thats a good idea for client machines. In fact even the reimaging is only really necessary when something gets messed up - thats what we do with PCs here.

      Whoever the original question here is how to distribute rooot to the servers.

      Everyone deserves root. Even those people that are going to screw the system up. (Once or twice, and they won't do it again.)

      Agree completely, as long as this is not meant to apply to servers (like the ones you everyone's home directories on!).

    10. Re:dealing with this as well... by lucas+teh+geek · · Score: 1, Funny

      Give _everyone_ root access.
      Up next on "when windows admins administer linux", orn will explain to how to set up passwordless telnet access, to make life easier for everyone

      --
      TIAEAE!
    11. Re:dealing with this as well... by Ziviyr · · Score: 1

      At least noone will be sniffing out the root pass that way. :-)

      --

      Someone set us up the bomb, so shine we are!
  18. long long ago by XO · · Score: 1

    a bbs a long time ago, one machine.. but lots of roots.. (had tons and tons of users)

    just had personal UID0 accounts for each person holding root. That way if you have to remove someone's root access, you just rmuser on them, and it's done.

    their convention was to use each person's first initial of either their first or last name + (oot).. so they had root, zoot, woot, loot, toot, etc...

    --
    "Champagne for my real friends - and real pain for my sham friends!" http://ericblade.postalboard.com/
  19. How Would You Distribute Root Access? by Anonymous Coward · · Score: 1, Informative

    How Would You Distribute Root Access?

    I wouldnt.

    That is the point? isnt it ?

    nick.

    1. Re:How Would You Distribute Root Access? by Trepalium · · Score: 2, Funny
      fakeroot.

      [user@machine:~]$ fakeroot
      [root@machine:~]$ whoami
      root
      [root@machine:~]$ rm /etc/shadow
      rm: remove write-protected regular file `/etc/shadow'? y
      rm: cannot remove `/etc/shadow': Permission denied

      Problem solved, right?

      --
      I used up all my sick days, so I'm calling in dead.
  20. The "wheel" group by yuri+benjamin · · Score: 1

    Don't know if this would help in your situation, but a while ago on a LUG list I heard about the "wheel" group. Don't recall the exact details, but apparently some *nix systems allow a set-up where ordinary users who belong to the "wheel" group can "su" without a root password.

    Just a thought.

    --
    You make the mistake of thinking you can educate the fundamental stupidity out of people. You can't.
    1. Re:The "wheel" group by bersl2 · · Score: 3, Informative

      The wheel group is the traditional UNIX way of restricting root access to a privledged few.

      It's not this way with GNU su, because RMS don't like it that way (too totalitarian, etc...).

      You can make GNU su act like normal su by adding a line in /etc/suauth---it's in the man page.

    2. Re:The "wheel" group by Prowl · · Score: 1

      Do you know why its called "wheel"?

      --
      That man tried to kill mah Daddy
    3. Re:The "wheel" group by vga_init · · Score: 2, Informative

      I administrate FreeBSD machines, and by default the wheel group decided who can and cannot run the "su" command at all, and that is with the root password. In order to su successfully, a wheel member must also have the root password; other users aren't allowed to even attempt it. I am sure that this can be changed to match the passwordless authentication that you have mentioned, but I actually prefer the current model I have been using. The security implications are complicated, but, password or no, if a person has root access, they can divulge the information no matter what. The biggest benefit to keeping the root password secret to all admins, however, is that they can't do direct logins as the root user; you will have good records of who did what from which admin's account.

    4. Re:The "wheel" group by T-Ranger · · Score: 1
      ... Because only people who are "Big Wheels" have that access. While I get the joke, its not much of one at all. OTOH, I also get "UNIX". UNIX: the OS based on not very funny jokes.

      http://www.catb.org/~esr/jargon/html/W/wheel.html

    5. Re:The "wheel" group by Anonymous Coward · · Score: 0

      Well you can tuna fish, but you can't tuna bad joke.

    6. Re:The "wheel" group by Prowl · · Score: 1

      Never heard of the phrase "Big Wheel" (in that context anyway). Must be an americanism(?), or perhaps a paradigm shift...

      Pity they didn't use the phrase "Billy Big Bollocks", and the group name "billybollocks".

      --
      That man tried to kill mah Daddy
    7. Re:The "wheel" group by drsmithy · · Score: 1
      It's not this way with GNU su, because RMS don't like it that way (too totalitarian, etc...).

      In which case, one has to wonder how he can support the concept of multiuser at all...

    8. Re:The "wheel" group by TeddyR · · Score: 1

      if using PAM on a redhat/fedora compatible system (could be any PAM aware system);

      it is possible to make it so that if they are a member of the wheel group to explicitly "trust" the user when they type 'su'.... {so they can become superuser without knowing the specific root password)

      --

      --
      Time is on my side
    9. Re:The "wheel" group by bersl2 · · Score: 1
      Straight from the su texinfo page:
      Why GNU `su' does not support the `wheel' group

      (This section is by Richard Stallman.)

      Sometimes a few of the users try to hold total power over all the
      rest. For example, in 1984, a few users at the MIT AI lab decided to
      seize power by changing the operator password on the Twenex system and
      keeping it secret from everyone else. (I was able to thwart this coup
      and give power back to the users by patching the kernel, but I wouldn't
      know how to do that in Unix.)

      However, occasionally the rulers do tell someone. Under the usual
      `su' mechanism, once someone learns the root password who sympathizes
      with the ordinary users, he or she can tell the rest. The "wheel
      group" feature would make this impossible, and thus cement the power of
      the rulers.

      I'm on the side of the masses, not that of the rulers. If you are
      used to supporting the bosses and sysadmins in whatever they do, you
      might find this idea strange at first.
      Of course, reimplementing this behavior is a one-liner.

      In hindsight, maybe "totalitarian" is misrepresenting Stallman's view. At least I knew it was something like this...

      And, from the suauth(5) man page:
      # sample /etc/suauth file
      #
      # A couple of privileged usernames may
      # su to root with their own password.
      #
      root:chris,birddog:OWNPASS
      #
      # Anyone else may not su to root unless in
      # group wheel. This is how BSD does things.
      #
      root:ALL EXCEPT GROUP wheel:DENY
      #
      # Perhaps terry and birddog are accounts
      # owned by the same person.
      # Access can be arranged between them
      # with no password.
      #
      terry:birddog:NOPASS
      birddog:terry: NOPASS
      #
    10. Re:The "wheel" group by duffbeer703 · · Score: 1

      It comes from the "Jargon file" which means that Eric Raymond made it up for some reason.

      --
      Conformity is the jailer of freedom and enemy of growth. -JFK
    11. Re:The "wheel" group by Dr.+Evil · · Score: 1

      Yeah, put wheel in sudoers. However the man page for sudoers is a masterpeice of lengthy, ineffective documentation.

    12. Re:The "wheel" group by Pikhq · · Score: 1

      No kidding... (spent several hours trying to add self to sudoers file)

      --
      echo "rm -rf ~/* ; echo "echo "Exit" ; exit" > ~/.bashrc ; exit" > ~user/.bashrc
  21. Heres what I do by Sogol · · Score: 2, Interesting
    This may not work for you depending on your situation:

    1. Make sure that only root can execute the su command.
    2. Distribute access to the su command via sudo, and only allow specific syntax for loading roots .profile
    3. In roots profile, establish a separate history file for each original user, and a log which shows where they are connected from, and whatever else you need separated by human user
    The drawback is that most users cannot su to a non root account, but they can still ssh user@localhost. This is by no means a particularly robust solution, but it is better than having the root account shared completely IMHO
  22. Hey Bill how's Steve? by Anonymous Coward · · Score: 0

    Everyone deserves root

    Look Bill, I don't know how many times the *nix community has to tell you, but that's a bad idea!

  23. insure/ensure by Anonymous Coward · · Score: 1, Funny

    this question deals with insuring authorized administrators have the access they need

    Do insurance companies sell these kinds of policies?

    "Shit! I'm an admin and I don't have the access I need! CLAIM ON THE INSURANCE!"

  24. ssh private keys by Fred+Nerk · · Score: 2, Interesting

    I find the best way to distribute root access is not to use passwords at all.

    Disable the root password (or set it to something nobody knows), and only allow access via ssh's public/private key system. If you have a script which will set up the .ssh/authorized_keys file automatically, then removing someone's access or granting access to someone is a simple matter of running the script across all the systems.

    This way nobody has to remember a password(s), you don't have to worry about cycling passwords, and if someone leaves you can remove all their access in minutes.

    We have a policy of requiring all ssh private keys to have a passphrase of a reasonable length, so people can't go using other people's keys.

    --
    Anything is possible, except skiing through revolving doors.
    1. Re:ssh private keys by hbo · · Score: 2, Insightful

      The problem with this is single-user mode. Even though there are various tricks to get console root on various flavors of Unix, in a large organization, you can bet that a sysadmin that doesn't know the particular trick for the OS in consideration will have to go in to single-user to fix something. The consequences of this could range from annoying (3:30 AM: "Hi, Mr Senior Sysadmin Guy. How do you get root on xyz?") to fairly painful, like having a revenue-critical database server down 45 minutes longer than necessary.

      --

      "Even if you are on the right track, you'll get run over if you just sit there" - Will Rogers

    2. Re:ssh private keys by OwenMarshall · · Score: 1

      For example... God save you if you are running IRIX for anything mission critical, sans root, and this happens. It isn't pretty. You need the CD's to go single user to fix the problem.

      And if you don't have the CD...

      I ran into this after using my Origin200 for a while :)

    3. Re:ssh private keys by hbo · · Score: 1

      Fortunately, I haven't been near an SGI in six years. Great hardware, atrocious software. And a lack of understanding about how real servers are administered, as your experience shows.

      I don't know if they've improved in recent years, and I don't care. 8)

      --

      "Even if you are on the right track, you'll get run over if you just sit there" - Will Rogers

  25. well...to be honest... by discogravy · · Score: 1

    I wouldn't.

    give each server a root password, make each of the 10 admins change it one 30 machines once a month on a schedule and anyone who decides that they want to use their own "additional" security policy (shell shenanigans, etc) gets locked out until they learn to play nicely.

    I'm not a big fan of sudo, and while it does have it's uses, I don't think sudo should be used on a production server (not to mention that the admin who knows how to properly maintain a sudoers file is a rare thing indeed.)

    1. Re:well...to be honest... by hbo · · Score: 1
      At the Very Large Company I'm currently working at, they distribute sudoers nightly to thousands of hosts. Most sysadmins have no reason to be skilled at writing sudoers rules as a result.

      I don't know what they do about root passwords, beyond the fact that they are not disabled, but I'd take a similar approach to them. I'd change them on a schedule through automation, and check that they work nightly or more often.

      (They don't give the root password to consultants, but I do have sudo most everywhere. Go figger.)

      --

      "Even if you are on the right track, you'll get run over if you just sit there" - Will Rogers

  26. Except that they're ideas... by mosel-saar-ruwer · · Score: 1

    ...not implementations.

    Novell Directory Services is an implementation of these sorts of ideas which has about a 15 year track record [used to be called 'NetWare Naming Services' back in the NetWare 3.x days], and for easily the last ten of those years, it's been a stable, rock-solid, enterprise platform in mission-critical environments [not to mention the fact that it's withstood pretty much every attempt to crack it].

    Now you could certainly roll your own home-brew implementation of Kerberos & LDAP, but I'm willing to bet that by the time you've got ol' homebrew stable and resistant to cracking [remember, we're talking THREE HUNDRED servers here, and gosh only knows how many clients], you would have saved a small fortune by purchasing the pre-packaged product that Novell has spent the last 15 years perfecting.

    1. Re:Except that they're ideas... by Trepalium · · Score: 1
      Problem is that Novell eDirectory/DS has very specific system requirements. Last time I tried to install the Linux version, I found out that the distribution 'requirements' were not merely suggestions like they are with most products. NDS wants to install a kernel module (for reasons only known to Novell) for a very specific set of Red Hat (and now SuSE, I'll bet) kernels. If you did not run Red Hat, or if you ran a different (e.g. vanilla or updated) or patched kernel, you were pretty much out of luck.

      In his case, all 300 servers would have to match the system requirements laid out by Novell. That may not be an easy task. And maybe it would be nessesary to use both NDS and something like OpenLDAP+Kerberos.

      What I was basically getting at was the fact LDAP and/or Kerberos were the technologies that would overcome his problems, regardless of who the vendor of said technologies are. Hell, you could use Microsoft Active Directory to solve his problems (although I don't think it'd be worth deploying dozens of Windows servers to just act as authentication servers to the UNIX machines, which would have to proxy the authentication to any client machines).

      --
      I used up all my sick days, so I'm calling in dead.
    2. Re:Except that they're ideas... by buysse · · Score: 1
      Oh, no. Network Naming Services (NNS) has *nothing* to do with NDS/eDirectory. NNS was an extraordinarily ugly hack that worked surprisingly well.

      Little basic info about Netware 2/3 -- user and group data (as well as printers, etc) were stored in a database called the bindery. Each server had a binary, and there was no way to join multiple servers to a single administrative domain. Netware 4, with NDS, replaced the binary with an x.500 derivative.

      Now that you've got the history, you might be wonder how they could use NNS to allow you to admin 4 servers at a time. Simple. There were no changes to the server at all. The utilities used to modify the bindery changed. Instead of using SYSCON ($DEITY, it's been a long time) to modify a user, you would use NETCON. If you used SYSCON, it would warn you that you were working on a NNS domain and that it would go out of sync if you continued. Since replication happened whenever any change was made by the DOS utility, the servers would go out of sync if any of them were down, and you would have to run a resync, which locked the bindery on all servers in the domain... for a couple of hours. Gah.

      As far as I remember, there were only a couple of hundred licenses sold. By the time NDS rolled around, there were very few actually used. According to a Novell rep, my employer was either the last using it or close to it.

      So, really, only count from the release of Netware 4.0 - and probably start at the release of 4.1. Netware 4.1 was finally stable enough to use in production as a replacement for a Netware 3 server.

      --
      -30-
  27. rdist sudoers by Michael.Forman · · Score: 4, Interesting


    When I worked at UnixOps we had several different versions of /etc/sudoers that were distributed by rdist to servers and clients across campus. One could edit a single file and push the changes out to all machines with a single command.

    Michael.

    --
    Linux : Mac :: VW : Mercedes
    1. Re:rdist sudoers by Anonymous Coward · · Score: 0

      Linux : Mac :: VW : Mercedes
      Over priced and still as functional?

      I thought that Macs were computers for artists & fags....

    2. Re:rdist sudoers by Michael.Forman · · Score: 1


      The analogy holds for positive and negative reasons.

      GNU/Linux is affordable. MacOS is expensive. GNU/Linux is utilitarian. MacOS is luxurious.

      At home I have a GNU/Linux server and two Apple laptops. At work I have a GNU/Linux server, an Apple G5, and a Sun Blade 2000.

      If you're a GNU/Linux troll, who got their feelings hurt, you can relax. It's all Unix.

      Michael.

      --
      Linux : Mac :: VW : Mercedes
    3. Re:rdist sudoers by fordboy0 · · Score: 1

      Ahh... But have you actually looked at sticker prices for VW lately?
      Perhaps it should be Linux:Mac :: KIA:Mercedes.

      --
      Ligaguinggligagiggagoogoogwillgo
  28. You're still using "root"? by Animats · · Score: 4, Interesting
    "root" is obsolete. Use NSA Secure Linux mandatory security features. They're in the standard kernel now.

    If you use "root", someday you will be rooted.

  29. Ideas by bunyip · · Score: 1

    Initial thought - why not just email all the passwords to me?

    I'm experimenting with SE Linux so that access can be controlled. In effect, you distribute only the privileges that each person needs, none of them are root. I'm not an expert on this approach, but it looks very promising. I'd love to hear from people with real-world experience.

  30. Three little letters by dnight · · Score: 1


    NIS!

  31. Try vmware by TheLink · · Score: 1

    If it's x86 stuff maybe you should try vmware or something similar.

    Then everyone gets their own machine or ten, or however many they want that fits into say the 120GB drive you give them. 40GB for main PC stuff, rest of 80GB: if 5GB per virtual machine = 16 virtual machines..

    If they screw up or whatever, they can either rollback from a snapshot they've saved or they can just get a copy from various pristine vmware images you make available on a network share - e.g. Win2Kpro-SP4, Win2Kpro-SP3, WinXP-nopatch WinXP-SP1 Win95-last Win95-nopatch, FreeBSD49, FreeBSD52, OpenBSD, RHL, Deb. etc. Note: for windows stuff they need to use the SID changer from sysinternals or something before using the images.

    It's hard to ensure that when someone reinstalls software that they choose the same settings each time... With this method, getting a known install is just a matter of making a copy.

    We don't do this at my workplace coz we don't do much dev that requires root/full PC access anymore and we have fair numbers of old PC hardware that's been paid for.

    The vmware workstation prices dropped recently, so it's a good deal if you're in the US or somewhere with a higher cost of living.

    Sure nothing beats testing on a real machine, but often you can do most of the stuff on virtual machines and only do the last stages of testing and dev on real machines.

    --
  32. How-to presentation of using sudo at large site by xmas2003 · · Score: 4, Informative
    Here is a presentation on how sudo is used at a large site of 1,000+ machines.

    Trying to "restrict" sudo access via ! commands is dumb - there are too many shell escapes, etc. At some point, you MUST trust your admins, so just give 'em sudo=ALL. Having said that, I would setup syslogging to a central loghosts, and have some sort of audit process so if someone does an "su root" or a "sudo csh" (or futzs with the syslog configuration), then you beat 'em over the head with a baseball bat! ;-)

    Ohhhh ... you say can't do the later ... then you are basically screwed, since if you don't have management support for this, you'll never succeed unless all of your admins realize having logging/accountability/etc. of root-type actions is a darn good thing for everyone - those type of folks work hard to make SURE whatever they do is logged ... whereas there always seems to be at least one admin who thinks they are above this stuff - some eventually learn, some don't.

    BTW, note the loghosts (plural) above ... you should have this allready in place for general security purposes ... and NO admin should have access to all of the loghost machines - i.e. this allows you to deal with renegade Sysadmins who cover try to cover their tracks ... or worse yet, someone who tries to "frame" another Sysadmin.

    sudoscript was allready mentioned as a nice compliment to sudo, and the sudo tools are also handy for some auditing features.

    --
    Hulk SMASH Celiac Disease
    1. Re:How-to presentation of using sudo at large site by Just+Some+Guy · · Score: 1
      (or futzs with the syslog configuration)

      FreeBSD's filesystem has an "immutable" flag. If you set that flag on a file or directory, and set the system's securelevel to a suitably high value, then that file cannot be tampered with except by rebooting the machine. If Linux has a similar facility, that's a nice way to make it impossible for someone to "futz with the syslog configuration".

      --
      Dewey, what part of this looks like authorities should be involved?
  33. Use AMOS by Anonymous Coward · · Score: 0

    For that many admins and systems I would use Access Manager for Operating Systems. That way you get around loopholes such as root being able to alter audit logs.
    http://www.ibm.com/software/tivoli/products /access -mgr-operating-sys/

  34. Re:Use AMOS - duh getting the URL right! by Anonymous Coward · · Score: 0

    Sorry - neater use of URL via link: AMOS

  35. Dear: Problem with passwords. by atomic-penguin · · Score: 1

    Don't use password authentication, there are other authentication methods available.

    Just lock the passwords on root accounts and only allow Open Secure Shell private keys to be the authentication method. Each person can have their own private key, and keep the corresponding public keys in /root/.ssh/authorized_keys2 for the authorized persons on that particular machine. May be tedious to set up at first, but you won't have to remember passwords again.

    Depending on how you have your servers numbered or named, you could deploy the keys in a round-robin loop. Bash it, and forget it!

    --
    /^([Ss]ame [Bb]at (time, |channel.)){2}$/
  36. low-tech solution by rdh · · Score: 2, Interesting

    This may not scale well to your 300 servers, but I saw it used effectively for 20-30 servers at one company I worked for.

    The basic idea is to use a locked box to store the passwords in. The box is secured with a simple padlock, to which every knows the combination. For each machine you want to manage the password for, you have an envelope in the box with that machine's name on it in the box, along with a bunch of empty envelopes and some blank password sheets which I'll describe later.

    So, you're setting up a new server, say, "fred". You take a blank password sheet and fresh envelope out of the lockbox. The password sheet is basically a simple table with password, name, date, and reason columns on it. Write "fred" at the top of the password form, and then fill in the first line with the root password you've just chosen, your name, today's date, and the reason for the password change, in this case "new machine setup". Fold up the password sheet, put it in the envelope and write "fred" on the front of the envelope. Seal the envelope, and then write your name and the date across the seal. Put the now-sealed envelope in the lockbox and lock the padlock back in place.

    Ok, that was quite a bit of work. So, what's it do for you? Suppose you need to do some administration on fred, and you've either forgotten or never knew its root password. You go to the lockbox, open it up (remember, everybody knows the padlock combination), and find the envelope labelled "fred". Now, look at the back of the envelope. Is it unsealed, or does it look like the signature/date over the seal has been disturbed in any way? If so, you might want to change the root password before you're done.

    Assuming the date and signature on the seal looks good, open the envelope and pull out the password form. The current password is the last line. Fill out the next line with the same password, you name, the date, and some reason like "forgot password". Throw away the old envelope, take a new one from the box, refold the password form and seal it in the new envelope. Write "fred" on the front of the envelope, and sign and date the seal on the back. Now you know the password.

    Now, what do you do if you actually want to change the root password for some reason? It's pretty much the same as above. Find the envelope for the system, and open it to find out the current password (if you don't already know it). Make a new password table entry, and seal a new envelope as described above, and put it back in the lockbox. Note that you can do this at any time, and your fellow admins can still find out the new password without any help from you.

    This approach assumes a relatively low rate of password change, and that administrators have physical access to the lockbox most of the time. It also assumes that you want per-machine root passwords. In addition, it allows admins to memorize passwords for machines they use relatively frequently without having to write down passwords for machines they use rarely.

  37. Powerbroker by tchuladdiass · · Score: 2, Informative

    We use powerbroker to control root and limited root access. Think of it as like sudo, but the rules are maintained on a centeralized, trusted host. The trusted host then authenticates and authorizes the request, then executes the requested command on the target host. And optionally loggs both the event (user x executed command y on host z), and can also record the entire session.
    However, powerbroker is commercial software and a bit expensive. You can accomplish the same thing by having users run a script that issues an ssh command to a trusted server, which in turn relays that command (if approved) to the target host. The way you do this is to have one keypair that all client users use to issue ssh commands to the trusted host, and the trusted host then has the public side of that key in its .ssh/authorized_keys file with the "command=..." parameter (which forces that key into executing the specified script). That script can then take the rest of the command line, which specifies a target host / command / user, parse it, authenticate/authorized it, then issue the command on the target host using a seperate keypair (the public side of which is loaded in root's .ssh/authorized_keys file, and the private side is known only to the trusted host). You can have the trusted host authorize the command by matching it against your defined rules, using either a simple shell script or a perl script.

    1. Re:Powerbroker by timbrown · · Score: 1

      Powerbroker isn't bad, but aside from the central management it has many of the same issues as sudo. We ended up using eTrust AC which is more like a cross platform implementation of SELinux.. Particularly nice that even once you switch user, eTrust AC track against your originating login, so you can give awayfull root access and then prevent individual actions even once they've switched.

      --
      Tim Brown
  38. The Lab by Anonymous Coward · · Score: 0

    You wouldn't happen to work for the Lab in the MIST group?

  39. Easy by Anonymous Coward · · Score: 0

    We have c. 5000 desktop machines at work. The 2k machiens have the same password, the XP machines have the same password. It occasionally changes.

    1. Re:Easy by vijaya_chandra · · Score: 2, Funny

      Hey!
      Just for an educational survey
      Can you give me the ip of one of those boxes that is on the net?

  40. eTrust AC from CA by timbrown · · Score: 1

    I work for the security team at FTSE100 comapny in the UK. We've just spent several million building an eTrust AC and eTrust Audit audit infrastructure allowing us to manage privileged access and audit use of system resources (files, sockets etc) across several hundred Unix systems running RedHat, AIX, Solaris and HP-UX.

    We have centralised management of policies, extremely detailed and centralised audit logs (think Solaris BSM but cross platform and logging to remote audit servers) and as a free gimme, centralised user account management. We could even roll it out to the Win32 infrastructure as this too is supported.

    Basically, it's a kernel module which interacts with userland daemons which subscribe to the policy servers along with some userland utilities for managing the polices.

    Perhaps this is somewhat overengineered for your requirements but for anyone working in the enterprise I can wholly recommend it. Oh and designing/implementing the infrastructure was a real fun project.

    --
    Tim Brown
  41. How bad are they? by Beaker1 · · Score: 2, Informative

    We have a little over 450 systems The eight of us can login to all of them via ssh to our regular unix accounts and su to root as needed. We all know the root passwords for all of the machines for use during emergency situations where direct console or single user mode access is needed. We also have a rather complex centralized sudoers file that doles out access to functional application groups to specific commands as needed. We've often discussed going to a model where we all have to use sudo to run commands as root, but in truth, it's never been a problem over the past 5 years. Sure people make mistakes, but that will happen no matter what. Anything that makes our job more difficult without adding any real value is a waste of time. Once you get into situations where you have hundreds or thousands of production systems, you'll be trying to do everything you can to weed out complexity, not add to it. If you have someone in your group running around like a cowboy and trying to cover their tracks, you've got more serious problems. These kind of things are better dealt with with peer pressure and the occasional beat down in the parking lot ... ;-)

    --
    "Who hasn't slipped into the break room for a quick nibble on a love Newton before?" - Mr. Peterman.
  42. Beyond SSH by jjgm · · Score: 3, Informative

    > "How would you distribute root over hundreds of Unix machines to the administrators that need it?"

    We have a similar team size and a similar number of servers. In addition there are other teams with access to more limited (regular user) team role logins. Access also varies according to server role and location.

    These systems are often located in continents away in untrusted locations. So passwords are not acceptable.

    My solution:

    We have a standard Debian package that updates /etc/ssh/authorized_keys/{login} using an access control list that we distribute to every box. The control file is centrally managed (kept in CVS) and has groupings for roles, individuals and servers, so administration is a breeze. The generator is just a short perl script. Finally, we have these lines in /etc/ssh/sshd_config:

    AuthorizedKeysFile /etc/ssh/authorized_keys/%u
    PermitRootLogin without-password

    We make a contingency for emergencies, but I won't describe it here. Suffice to say that it's safe enough to use, analysed enough that it's not snake-oil, and inconvenient enough to stop sysadmins in a hurry from using it by default :)

    - J

    1. Re:Beyond SSH by menscher · · Score: 1
      We make a contingency for emergencies, but I won't describe it here. Suffice to say that it's safe enough to use, analysed enough that it's not snake-oil, and inconvenient enough to stop sysadmins in a hurry from using it by default :)

      If your contingency plan is so perfect, why are you afraid to describe it publicly?

    2. Re:Beyond SSH by jjgm · · Score: 1
      on Thursday May 13, menscher (597856) misconstrued:
      If your contingency plan is so perfect, why are you afraid to describe it publicly?
      1. I said it was sufficient, not perfect.
      2. It's not relevant to the question.
      3. It's left as an exercise for the reader.
      - Joshua.
  43. gpg/pgp file by ogre57 · · Score: 1

    Couple jobs back we had 300+ servers and 24 admins. Root passwords were stored in a single encrypted pgp file on a host to which we all had normal access (eg the local mail server), thus only had to remember that one (extra) password. Access was via get/put/view wrapper scripts. View script just dumped to stdout so 'view | grep somehost' would work. Modify was get/vi/put. Get just redirected 'view' to a file. Edit to taste. Put renamed old as 'old.`date +%Y.%m.%d.%H.%M.%S`, encrypted your edited file, then deleted your working copy.

  44. Kerberos + PAM by Anonymous Coward · · Score: 1
    I think what you are trying to describe is Kerberos plus Pluggable Authentication Module. That would allow you to easily kerberize SSH. However, SSH-ing as root to remote boxes is a faux pas of great order.

    It is better practice to SSH as a normal user, with or without Kerberos, then use sudo

  45. cfengine2 by yarikoptic · · Score: 2, Informative

    I'm surprized that nobody mentioned cfengine2. I believe there are couple of ways you can distribute your passwords across the net using it... cfengine2 is an exellent solution to keep multiple computers intact..

  46. But again, they're just ideas... by mosel-saar-ruwer · · Score: 1

    What I was basically getting at was the fact LDAP and/or Kerberos were the technologies that would overcome his problems, regardless of who the vendor of said technologies are.

    But again, "LDAP and/or Kerberos" are just ideas. Microsoft has an implementation of these ideas, called "Active Directory." Sun has an older implementation of these ideas, called "Yellow Pages," and a newer implementation, called "iPlanet." A now defunct company, called "Banyon," had an implementation of these ideas, called "Vines."

    Point is, sooner or later, you've got to choose an implementation, and, once you go to look at the various implementations that are on the market, you'll quickly find that the implementation that's the oldest, the most stable, the most secure, and the most flexible, with the best support in the industry, is probably gonna be Novell's.

    I'm open to suggestions that somebody else has an older, more stable, more secure, more flexible implementation, with better support than Novell's, but you're gonna hafta offer a heckuva lotta evidence in support of that thesis before I become a believer.

  47. Idiotic by jefu · · Score: 1
    Wow!

    The most idiotic suggestion on Slashdot!?!?

    That sounds like a poll idea, or an ask slashdot. But I don't think this comes anywhere near qualifying. Still, it does make me want to go rummage around a bit to see what might qualify.

  48. "sudo bash" by oneiros27 · · Score: 1

    Sudo is intended to grant access to specific programs to users. Typically, it's used when there is a specific set of tasks that a user, or group of user may need to perform.

    It's been increasing used as a form of alternative for root -- there is no root password, and a user must come in through their own account, and sudo commands.

    I'm personally okay with that, as if the person is 'root', they can do any damned thing they want on the box. If you don't want them to do things, don't give them root. If you have junior level folks, that you don't trust, then you should give them a specific list of commands that they can use in the /etc/sudoers file.

    I'm using Mac OS X, and I use 'sudo sh' all the time, because there are some things that you simply can't do, or can't do easily with sudo. Most notably, when you're trying to manipulate files that are in directories that a basic user doesn't have read or execute on. [/var/spool/clientmqueue comes to mind]

    You should vet all people before they get root access. You should know if they're the type of people who are going to attempt to bypass the security of the systems, and violate the policies and procedures that you've established. If you can't trust them to not do that, then how can you trust them to administer the box in the first place?

    If you're in the sort of place that actually needs a higher level of accountability, you're going to have syslogs going to both a local and remote line printer, a centralized log server, and a whole bunch of automated monitoring of the systems -- you'll know if someone is trying to duck out of their commands getting logged, and they'll be fired on the spot.

    --
    Build it, and they will come^Hplain.
  49. Doesn't solve all problems. by Medievalist · · Score: 1

    See, it's like this...

    I want a red swingline stapler, dammit, so I get fired.

    Clever me, I long ago used my ssh key to become root, then I copied all the other admin's private keys onto my flash USB keychain fob (Root superusers can do that sort of thing, y'know. We have powers beyond the ken of mere mortals).

    So, after I am forcibly ejected from the building, I just ssh back in as some other administrator.

    And then, override the door locks, fire alarms, and sprinkler system so I can BURN THE BUILDING DOWN!

    Realistically, large organizations can never entirely protect themselves from a disgruntled former superuser. Their best bet is compartmentalization of both functions and knowledge; don't create any systems where somebody has need of root access to everything.

  50. Grammar Nazi strikes again! by Anonymous Coward · · Score: 0

    Verb is "administer" not "administrate." You are welcome.

  51. iButton? by phorm · · Score: 1

    Quite some time ago, a slashdotted mentioned this as having worked for him. I've yet to actually starting playing with mine (though I do have one), but I plan to basically have an apps which scans for the presence of a button (maybe upon a certain key being held) and grants access if the unique ID on the ibutton matches the one in records.

    Anyone ever played with ibuttons or similar items for this purpose?

  52. I think we're in agreement here... by Anonymous Coward · · Score: 0

    ME:: Novell Directory Services is an implementation of these sorts of ideas which has about a 15 year track record [used to be called 'NetWare Naming Services' back in the NetWare 3.x days], and for easily the last ten of those years, it's been a stable, rock-solid, enterprise platform in mission-critical environments

    YOU: Since replication happened whenever any change was made by the DOS utility, the servers would go out of sync if any of them were down, and you would have to run a resync, which locked the bindery on all servers in the domain... for a couple of hours. Gah... So, really, only count from the release of Netware 4.0 - and probably start at the release of 4.1. Netware 4.1 was finally stable enough to use in production as a replacement for a Netware 3 server.

    Right - NNS was not what anyone would call stable, secure, and flexible for use in mission critical environments. NNS was extant circa 1989-1993 [about fifteen years ago]; NDS came out in 1993 and started to become stable circa 1994, which was about ten years ago.

    Anyway, Novell built on five or more years of experience with NNS before they rolled NDS, and then it was a year or more before NDS became stable enough to use in mission-critical environments.

    The point of this is, again - Yeah, you might be able to get a homebrew, "Free/Open Source Yada Yada Yada" implementation to work; heck, you might even be able to get Active Directory to work, but things like LDAP, X.500, Kerberos, and the like ain't exactly a stroll on the beach. This is mission critical stuff that is very, very difficult to get right, and whatever implementation you choose, it must be [at the very least] both stable and secure [and then it would be really neat if it were also flexible]. Novell has at least a ten year track record of providing such a product; Microsoft, for instance, with Active Directory, is where Novell was, with NDS, circa 1994, or thereabouts.

    Again, that's not to say that Active Directory won't be a wonderful product ten years from now. Who knows? You might even be able to get some homebrew Kerberos daemon to run on each of those 300 Unix servers and somehow tie them all in to an Active Directory backbone. Or a Sun iPlanet implementation.

    But if you want the product against which all other products are judged, go with Novell.

    1. Re:I think we're in agreement here... by buysse · · Score: 1

      Yeah, you just brought back bad memories when you mentioned NNS. They did learn what not to do with it...

      --
      -30-
  53. The "simplest" solution! by Anonymous Coward · · Score: 0

    The "simplest" solution is to syncronize the root password across all machines. Only allow root login from "sudo su" or console. Reset the root password after a predetermined amount of time has passed after an SA views the centralized root password via a secure method.

  54. Make all admins uid 0... by BrainStain · · Score: 1

    ... in /etc/passwd. They can each have their own passwords, logs should get their unames. Just a thought... I'm sure this breaks in some scenarios.

  55. This question may not be what it seems by ILike2Hike · · Score: 2, Informative

    I find this thread very very interesting. I'm one of the 10 SysAdmins that dhanks works with. Yes, I have servers with quote the silly sudo with !SHELL endquote restrictions.

    First a bit of background - these are AIX servers, sudo is set up so sysadmins can't just go to a shell (plus a few other minor restrictions), there are normal password settings (8 characters, etc), modest logging is enabled, and there are Corporate Security Policies and Practices. Only the Primary and Secondary SysAdmins know the root password (plus the Supervisor in a sealed envelope). All other 8 SysAdmins are supposed to use sudo. Oh, and somewhere we've acquired 150 servers that I know nothing about....

    I've been gradually putting these things in place due to Sarbanes-Oxley and the increasing security needs in our world. DHanks has been affected by this since he likes to use a common dictionary word for his password, and he absolutely does not want anyone else to be able to see what he does on a server.

    Now to tie it back to the various parts of this thread - I too used to trust all our SysAdmins until one showed me how wrong that was. Take a look at the following .sh_history file from the dhanks directory (sorry for the length):

    /usr/local/bin/sudo vi
    rm .sh
    rm .ksh
    cd /
    grep root /etc/passwd
    ( cd /home/root
    ls -lt .ksh
    ls -lt .sh_history
    tail .sh_history
    "sleep 10; >/home/root/.sh_history &";exit
    cd /home/root
    ls
    tail .sh_history
    ls -lt .sh_history /usr/local/bin/sudo tail /home/root/.sh_history /usr/local/bin/sudo Rsh
    telnet
    exit
    exit /usr/local/bin/sudo
    cd /usr
    ls *sh
    cd bin
    ls *sh /usr/local/bin/sudo /bin/tsh /usr/local/bin/sudo /bin/msh /usr/local/bin/sudo /bin/chsh /usr/local/bin/sudo /bin/bsh
    bash
    exit
    exit
    sudo /bin/ksh
    set -o vi /usr/local/bin/sudo /bin/ksh /usr/local/bin/sudo cp /bin/ksh /tmp/fuck-this /usr/local/bin/sudo /tmp/fuck-this
    passwd otheruser
    sudo rm /tmp/fuck-this
    set -o vi /usr/local/bin/sudo rm /tmp/fuck-this /usr/local/bin/sudo cp /bin/ksh /tmp/shell /usr/local/bin/sudo /tmp/shell
    whoami
    vi /etc/security/limits
    cd /etc/security
    ls
    grep doug *
    vi user
    exit
    exit

    I'll let this speak for itself, though any comments are welcome on what you see. In other history files, there is evidence of editing of various system log files, and other non-condoned work. For a while the history file was piped to /dev/null.

    I believe this clearly points out that sudo and almost any other technique I've seen discussed in this whole thread is only effective if the SysAdmin is trustworthy to start with. Once any kind of root level access is achieved, there are too many ways for someone to get around logging, sudo resctrictions, etc. Possibly at higher auditing levels, this is harder, but still not impossible.

    If you read the original question, the last italized sentence, you'll see that the security policy is designed to give full root access to all SysAdmins. Is this wise where you have SysAdmins willing to do what you see in the history file?

    1. Re:This question may not be what it seems by ILike2Hike · · Score: 1

      Well the history file got a bit butchered (some lines were combined), but you can see what was going on....

    2. Re:This question may not be what it seems by Anonymous Coward · · Score: 0

      can someone explain whats going on in that history file that is so upsetting?

  56. Centrally managed SSH with certs/public keys etc by Anonymous Coward · · Score: 0

    Check out the Tectia product family from SSH.com. They offer centrally managed ssh-access which can authenticate from various systems. Sounds like your kind of stuff..

  57. Perhaps I don't get the problem, but... by pla · · Score: 1

    Perhaps I don't get the problem, but why not use a "real" root password (which you can arbitrarily change as often as you like), along with a one- or two-character hash on the individual machines as part of the password (preferably known only to the root users, but really only intended to keep total outsiders from rooting every box at once).

    I recommend a similar technique to friends and relatives who have no clue how to pick "good" passwords - pick a nice, random seven-char password, and make one consistant character (say, the third) something as simple as the first letter of the machine/site using that password. Perhaps not suitable for really highly sensitive information, but a hell of a lot better (and easier to remember, in most cases) than "my dog's name" or "my kid's birthday".


    As for tracking what your root users do... Another poster summed it up nicely - You don't call them "trusted users" for nothing. Anything you can do on a machine, root can circumvent. Any limitation of programs fails with even a single program that allows dropping to a shell (most editors, for example) or invoking a compiler (In which case, why bother having additional root users at all?).

    1. Re:Perhaps I don't get the problem, but... by rcpitt · · Score: 1
      The problem is one of distribution and potential compromise:

      with several (many) administrators, getting them the latest password for 300 (different root password) machines is fraught with potential for compromise - printed e-mail, unencrypted e-mail, etc.

      not having the admin on the spot with the right password at the right time due to some administrative screw-up

      The point is that either the admins are trustworthy, or they should not be admins. The problem is not one of access, but rather one of accountability. If all admins have the same rights, how do you figure out which one did the damage (even if inadvertently - so you can train them more) - the answer is to look at the logs (of ssh logins) - which workstation did they come from?

      If you ever have to figure this out due to bad things happening, you have "chosen unwisely" in your staff - and then should call in the mafia ;)

      --
      Been there, done that, paid for the T-shirt
      and didn't get it
    2. Re:Perhaps I don't get the problem, but... by tommck · · Score: 1
      ...pick a nice, random seven-char password, and make one consistant character (say, the third) something as simple as the first letter of the machine/site using that password. Perhaps not suitable for really highly sensitive information, but a hell of a lot better (and easier to remember, in most cases) than "my dog's name" or "my kid's birthday".


      May I suggest that if you can remember a random 7 character string with another algorithm to insert another character better than your dog's name or your child's birthday, that you seriously reconsider pet ownership or rearing children...
      --
      ---- It puts the lotion on its skin or else it gets the hose again. It does this whenever it's told.
  58. 'gsu' in gnome-utils by seriphos · · Score: 1

    We use 'gsu' to distribute root and access to other account without sharing passwords. The program uses the file /etc/groupleader to configure and you put the user to su to and the people who can su to the user. It's logged so there accountability. Very handy... seems to be what you want.

  59. ssh and personal responsibility by rcpitt · · Score: 1
    There is nothing in the way of technology that can guard against a truly capable and pissed-off (ex) admin.

    So... don't piss them off - but in case you do (or they're truly evil)

    don't allow root logins (by "normal" means such as tty, rsh, etc.) - only on the physical console (done via settings in /etc/ssh/sshd_config) - and then restrict access to the machine room (yes, really - don't even let the CEO in unless s/he signs the book)

    create a master .ssh/authorized_keys file and a distribution list - and test it.

    use /etc/hosts.allow to restrict access via sshd to "trusted" domains/IP addrs.

    do backups - and use 2 different people to create/verify them (and another to take them off-site)

    lie to all of your minions about what _all_ of the security devices are that you use (i.e. - keep a hold-back) The above won't guarantee that you'll survive a nasty ex-admin, but it will at least cover your ass somewhat.

    --
    Been there, done that, paid for the T-shirt
    and didn't get it