Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
I have a feeling the short answer to this question is 'use cvs' but i'm foraging ahead since i have no experience with cvs and a fair amount with rcs...

I'm writing a script that will pull down router configs via tftp and I would like them to be written to an rcs guarded file on the server. Checking out the config is not a problem, however rcs only gives write permission to the file owner. Tftpd writes files as 'nobody'. In the hopes of checking the config file out as 'nobody' I did a

chown nobody scriptname
chmod 4755 scriptname

But to no avail. The script still checks out the config file from rcs as the actual uid of the individual running the script. Is this something I need to follow up with in my script's code, or am I just not understanding using the setuid bit? My code snip is as follows:

#!/usr/bin/perl -w use strict; use Net::SNMP; use Rcs; my $rcs = Rcs->new; $rcs->rcsdir("/usr/local/tftp/RCS"); $rcs->file("router.cfg"); $rcs->co('-l'); &copy_config_from_tftp; $rcs->ci('-u');

In reply to forcing script to run as specific user by c

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (5)
As of 2024-03-29 15:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found