Re: NIS and /etc/profile

From: Tim Haynes (usenet@stirfried.vegetable.org.uk)
Date: 06/29/02


From: Tim Haynes <usenet@stirfried.vegetable.org.uk>
Date: Sat, 29 Jun 2002 16:12:53 +0100


"Tony" <tony.wong@sbcglobal.net> writes upside-down like a silly wombat:

> to every single machine?

Yes. What's so hard, and why not consider implementing a proper
/usr/local/share/etc/ tree for the purpose?

Or why not do it all in batch mode? Assuming you have ssh key access to
either the root account, or a user with sudo, on each box, something like
the following would do the trick:

    for i in `cat host_list.txt`
    do
      echo Fixing box $i
      ssh root@$i "echo somecommands >> /etc/profile"
    done

ssh -t is invaluable for sudo over ssh.

~Tim

-- 
Meet me at the ocean                        |piglet@stirfried.vegetable.org.uk
the sunrise meets the day                   |http://spodzone.org.uk/
on the hill                                 |



Relevant Pages

  • Re: NIS and /etc/profile
    ... /usr/local/share/etc/ tree for the purpose? ... ssh -t is invaluable for sudo over ssh. ...
    (comp.os.linux.security)
  • Forcing new password at login (w/o requiring an old password) (sudo related)
    ... this isn't an SSH problem. ... and taking that technique a little further is stumping me. ... sudo access to these users (assuming I want to avoid password-less sudo, ... grant password-free passwd capability until that NOPASSWD entry ...
    (comp.security.ssh)
  • Re: Problems with Sudo
    ... you can't sudo to root. ... SSH is generally allowed, all limitations should still apply including ... secure, the internet is a very dangerous place. ... allowing someone to break out of a chroot jail by simply logging back ...
    (Ubuntu)
  • Re: ssh and sudo not working together....
    ... > I have this so far but it is not allowing sudo, ... > is NET::SSH or that RSA type of SSH we are running? ... for that command to interact within. ... -T Disable pseudo-tty allocation. ...
    (perl.beginners)
  • Re: Is SSH worth it??
    ... Keep in mind you can now sniff SSH ... Because the network traffic in a ssh connection is strongly encrypted ... sudo is a lot more useful in such cases. ... without having to divulge the root password. ...
    (Security-Basics)