There might be a check somewhere not only for the EUID, but also for the UID. Try setting
$< = 0, or by using
POSIX::setuid.
Having said that, you may want to get rid of perl-suid, as it has been deprecated for some time, and gotten rid of in 5.12. You're probably better of either using sudo, or putting the appropriate magic in your /etc/fstab so a file system can be mounted by a non-root user. For instance, on my home boxes, I have:
/dev/sdb1 /mnt/sdb1 auto use 0 0
/dev/sdb2 /mnt/sdb2 auto user 0 0
in my
/etc/fstab file, allowing a non-root user to mount usb devices.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.