List crontab for a different user from within a perl script

Posted on 2005-05-04
Last Modified: 2008-03-03

Is it possible for a user "A" to execute a perl script - that would read the crontab listings of another user "B"?? If so please explain how.

Thanks in advance.

Question by:sushiltanna

    Author Comment

    User "A" is neither root nor does he have any special rights.
    LVL 20

    Accepted Solution

    The crontabs are normally kept as files, often in a directory named "/var/cron/tabs" or "/var/spool/cron/crontabs". You'll find that  an unprivileged user will not be able to read the crontabs of other users or, possibly, even read the crontab directory.

    Perhaps if you'll explain a little more about what you're attempting to accomplish, we can provide a solution.
    LVL 48

    Assisted Solution

    The only way to acheive what you want is by writing a SUID perl script, or using a tool like sudo.

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    Join & Write a Comment

    I've just discovered very important differences between Windows an Unix formats in Perl,at least 5.xx.. MOST IMPORTANT: Use Unix file format while saving Your script. otherwise it will have ^M s or smth likely weird in the EOL, Then DO NOT use m…
    There are many situations when we need to display the data in sorted order. For example: Student details by name or by rank or by total marks etc. If you are working on data driven based projects then you will use sorting techniques very frequently.…
    Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now