run set-uid shell program in ubuntu and set premission 4755
UbuntuThis forum is for the discussion of Ubuntu Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
run set-uid shell program in ubuntu and set premission 4755
hi dear's,
how i can Run Set-UID shell programs in ubuntu 12.10?
and then, how i can copy /bin/zsh to /tmp, and make it a set-root-uid program with permission 4755????
a shell script itself is not runnable but executed by an interpreter. Therefore the setuid flag has no any meaning on the script file itself. You need to set it on the interpreter (the real binary executable).
set-root-uid can only be set by root.
a shell script itself is not runnable but executed by an interpreter. Therefore the setuid flag has no any meaning on the script file itself. You need to set it on the interpreter (the real binary executable).
set-root-uid can only be set by root.
how i can set it??
i login as root,
it's my practice,
2.(2.5 points) Run Set-UID shell programs in Linux, and describe and explain your observations.
a.Login as root, copy /bin/zsh to /tmp, and make it a set-root-uid program with permission 4755. Then login as a normal user, and run /tmp/zsh. Will you get root privilege?
how i can solve it??
whats is ur suggestion??
is that this solution correct??
when i want set chmod 4755, use below command:
chmode=4755 (it means -r--rwxr-x)
ad for copy /bin/zsh to /tmp, i use blow command:
cp /bin/zsh /tmp
is that this solution correct??
when i want set chmod 4755, use below command:
chmode=4755 (it means -r--rwxr-x)
ad for copy /bin/zsh to /tmp, i use blow command:
cp /bin/zsh /tmp
first do the cp
then check it with stat
Code:
stat /tmp/zsh
now use the chmod command on /tmp/zsh, and re-check with stat
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.