Well, to be honest... It is an exercise on my studies (Operating Systems course). We have to write a program that launches bash shell with root's privileges and then make it executable for every user...
Type: Posts; User: ppplayer80; Keyword(s):
Well, to be honest... It is an exercise on my studies (Operating Systems course). We have to write a program that launches bash shell with root's privileges and then make it executable for every user...
No. I have program wrote in C language. But yes, it uses sudo to call another program :)
Well, that's it:
system("sudo bash");
It does.
But there must be a way to do it without a password :(
Okay, take a look at what I have here please:
Where "[Directories...]" is a directory structure which I am sure is proper. And then I go into this directory and type
And then it asks me for...
Yes, I understand. Thanks :)
Well I wanted to use suid but it still seems not to be working... So I tried your method and... it still doesn't work. I basically lost any hope that it will ever...
Thanks Impavidus, now I get it. However it still asks me for a password when I try to execute this program. Maybe I'll say what this program basically does: it launches command prefixed with `sudo`....
Thanks for a reply.
Well, I need to make it available for every user. Not only from specific user group. I just wonder why SUID does not work while it does not even display error message...
And...
Hi.
I need to set executable file's properties to make it executable for every user with root's privileges. I found out that SUID will do the trick so I set file's properties with chmod command...
Hi!
If I do something like this:
int *array = (int*) malloc(sizeof(int) * randomnumber);
Does it mean that malloc creates an... lets say 'continuous' block of memory for this array? I mean,...
Thank you for the answer, @ofnuts!
I'm sorry, but I don't understand this :-(
EDIT//
Ah... I think I get it. But that's what I said in the first post! I count from 0 to 7 in an 'array' version...
Hi,
I would like to ask what is the difference between these 2 functions:
Function 1
Function 2
Because I am 100% sure there must be a difference. When I run my program with a first function,...
Thank you! :)
Hi,
I have a simple question.
If I type something like
if (a==1 && b != 3)
And lets say that 'a' is equal to 2. Does a program check b's value or stops when it discovers that 'a' doesn't...
Big thanks to you guys, I almost get it now. I just don't understand that "dollar" part. The beginning of the steeldriver's post seemed to solve my problem, but then this appeared:
...
Hi,
I was wondering if it is possible to use a defined constant, like
#define PRECISION 3
In a printf format, like
printf("%.PRECISIONf", SomeFloatVariable);
How to define a number's...
Well, of course I will check this, but I'm 99% sure it does work as I described in a first post. Are you sure about this?
I will check this a bit later, I cannot do it right now.
Thank you for...
Hi,
I'm sorry if this problem was already discussed here. I don't know what to type in Google to find it.
Here is a fragment of my code:
if (var/900==1 || var/400==1)
{
var2[i]...