![]() |
|
|||||||
| General software and network General OS-independent software and network questions, X11, MTA, routing, etc. |
![]() |
|
|
Thread Tools | Display Modes |
|
||||
|
Wouldn't sudo(8) do this easily?
__________________
OpenBSD LiveCDs/LiveDVDs |
|
||||
|
Yup.
Code:
# sudo -u test ls BACKUP # grep test /etc/passwd test:*:2000:2000:test:/var/empty:/usr/sbin/nologin
__________________
religions, worst damnation of mankind "If 386BSD had been available when I started on Linux, Linux would probably never had happened." Linus Torvalds Linux is not UNIX! Face it! It is not an insult. It is fact: GNU is a recursive acronym for “GNU's Not UNIX”. vermaden's: links resources deviantart spreadbsd |
|
||||
|
Thanks, that works. I typically don't have sudo installed/configured though.
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things. |
|
||||
|
I probably would have tried execl() or execv()
__________________
My Journal Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| DHCP client allows shell command injection | J65nko | News | 0 | 7th April 2011 01:09 AM |
| Running a command with input from a file. | bigb89 | Programming | 4 | 21st January 2009 05:36 PM |
| Execute a command during login | rex | FreeBSD General | 4 | 12th September 2008 08:09 PM |
| command launched by normal user... | maurobottone | OpenBSD General | 4 | 1st June 2008 03:45 AM |