View previous topic :: View next topic |
Author |
Message |
xtemp0raneous n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 13 Sep 2004 Posts: 2
|
Posted: Wed Nov 10, 2004 12:15 am Post subject: /sbin/halt permissions |
|
|
Hi,
I am perfectly content to use the sudo solution to allow regular users to reboot and halt the system, but I was not able to find how gentoo limits /sbin/halt to superuser only. I'm just curious for my own education. Any good links to this info?
thanks |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
db_404 Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 05 Dec 2002 Posts: 336
|
Posted: Wed Nov 10, 2004 5:42 pm Post subject: |
|
|
I presume its just checks for the running user being UID 0. A check of the source would confirm that though. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
db_404 Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 05 Dec 2002 Posts: 336
|
Posted: Wed Nov 10, 2004 5:51 pm Post subject: |
|
|
Yep, I just looked:
from the halt.c code
Code: |
if (geteuid() != 0) {
fprintf(stderr, "%s: must be superuser.\n", progname);
exit(1);
}
|
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
xtemp0raneous n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 13 Sep 2004 Posts: 2
|
Posted: Thu Nov 11, 2004 1:49 am Post subject: |
|
|
thanks db_404 |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|