Christopher Head wrote:
> It is. Until Linux capabilities, EUID==0 used to be special-cased in the
> kernel
Thank you all, I got a good learning *and* something to rememeber.
--
goto /dev/null
--
http://mail.python.org/mailman/listinfo/python-list
On 07Jun2011 20:22, Nitin Pawar wrote:
| import getpass
| user = getpass.getuser()
|
| On Tue, Jun 7, 2011 at 7:54 PM, TheSaint wrote:
| > I was trying to find out whose the program launcher, but os.environ['USER']
| > returns the user whom owns the desktop environment, regardless the program
|
On Wed, 08 Jun 2011 21:58:17 +0800, TheSaint wrote:
>> os.geteuid
> This return 0 for *root* . I don't know if it's a standard for all distro.
UID 0 is the "superuser". The name "root" is conventional, but it's the
EUID (effective UID) which is used in permission checks; the kernel
doesn't care a
On Wed, 08 Jun 2011 21:58:17 +0800
TheSaint wrote:
> Kushal Kumaran wrote:
>
> > os.geteuid
> This return 0 for *root* . I don't know if it's a standard for all
> distro. Mine is Archlinux.
> I'd just like to avoid error caused by wrong access by user
>
It is. Until Linux capabilities, EUID==0
Kushal Kumaran wrote:
> os.geteuid
This return 0 for *root* . I don't know if it's a standard for all distro.
Mine is Archlinux.
I'd just like to avoid error caused by wrong access by user
--
goto /dev/null
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, Jun 7, 2011 at 7:54 PM, TheSaint wrote:
> Hello,
> I was trying to find out whose the program launcher, but os.environ['USER']
> returns the user whom owns the desktop environment, regardless the program
> is called by root.
> I'd like to know it, so the program will run with the right pri
import getpass
user = getpass.getuser()
On Tue, Jun 7, 2011 at 7:54 PM, TheSaint wrote:
> Hello,
> I was trying to find out whose the program launcher, but os.environ['USER']
> returns the user whom owns the desktop environment, regardless the program
> is called by root.
> I'd like to know it,
Hello,
I was trying to find out whose the program launcher, but os.environ['USER']
returns the user whom owns the desktop environment, regardless the program
is called by root.
I'd like to know it, so the program will run with the right privileges.
Is there any standard function on python, that