New answers tagged privileges
0
edit nano /etc/sudoers
and add:
user ALL=(ALL:ALL) ALL
0
1) Become root. You can do this using sudo -i or becomming root the old fashioned way su -
2) Run visudo
3) I changed this portion of the sudoers file to have my chosen users become sudo users, and you can add users similarly (blank lines introduce to format cleanly):
## User Aliases
## These aren't often necessary, as you can use regular groups
## (ie, ...
0
I think I've found the solution to my problem, so now I'm posting it.
Testing admin privileges can be done like so :
uid_t uid = getuid(), euid = geteuid();
if(uid < 0 || uid != euid) {
// Can stop or reboot system
} else {
// Cannot stop nor reboot system
}
0
You have to run chmod command as root. To do this use the command like this:
sudo chmod o+w fileName
With this command you add write permission to "other". Then you have to type your username and password.
"o" is the option for other and you add write permission with "w". Here are other options:
u - owner
g - group
o - other
a - all
You can read more ...
Top 50 recent answers are included