Search Results

Search: Posts Made By: Corona688
Forum: Programming 08-09-2010
8,157
Posted By Corona688
Precisely backwards. :) Nonzero values mean...
Precisely backwards. :) Nonzero values mean error. You can simplify the expression a lot:

if(WEXITSTATUS(system("gksudo")))
cout << "Error\n";
else
cout << "Success\n";
Forum: Programming 08-09-2010
8,157
Posted By Corona688
From man system...
From man system (https://www.unix.com/man-page/Linux/3/system/):

RETURN VALUE
The value returned is -1 on error (e.g. fork(2) failed), and the
return status of the command...
Forum: Programming 08-09-2010
8,157
Posted By Corona688
Depends how exactly you ran it. How are you...
Depends how exactly you ran it. How are you running it?
Forum: Programming 08-09-2010
8,157
Posted By Corona688
A few things... 1) You haven't given sudo...
A few things...
1) You haven't given sudo anything to do, so I don't think that will work. If you want to change the password, why not sudo -u username passwd username? That will request the...
Forum: Programming 08-09-2010
8,157
Posted By Corona688
No, never. This is a very poor practice, when...
No, never. This is a very poor practice, when UNIX has such a wide arrays of better ways to share and restrict things. Better to use existing systems rather than try and craft your own; probably...
Forum: Programming 08-09-2010
8,157
Posted By Corona688
Passwords need this protection becase otherwise...
Passwords need this protection becase otherwise people would do things like what you're doing.

What is the ultimate goal here?
Showing results 1 to 6 of 6

 
All times are GMT -4. The time now is 04:12 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy