[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Determining user ID
From: |
Christopher Browne |
Subject: |
Re: Determining user ID |
Date: |
Wed, 21 Dec 2005 15:55:10 GMT |
User-agent: |
Gnus/5.1007 (Gnus v5.10.7) XEmacs/21.4.17 (Jumbo Shrimp, linux) |
"Paul Krizak" <paul.krizak@amd.com> writes:
> You could do something like:
>
> groups:
> pgonedatabaseuser = ReturnsZero(/bin/sh -c
> ${dblquote}/usr/bin/whoami | grep -q pgonedatabaseuser${dblquote})
> pganotherdatabaseuser = ReturnsZero(/bin/sh -c
> ${dblquote}/usr/bin/whoami | grep -q pganotherdatabaseuser${dblquote})
Ok, that's a bit less elegant than I was hoping for, but, with minor
tweaking, that works fine.
Tweaking...
groups:
pginfo = ReturnsZero(/bin/sh -c "/usr/bin/whoami | grep pginfo")
postgres = ReturnsZero(/bin/sh -c "/usr/bin/whoami | grep postgres")
cbbrowne = ReturnsZero(/bin/sh -c "/usr/bin/whoami | grep cbbrowne")
This has the irritation that I have to predefine every user I could
possibly want to use, although I suppose that's no big deal in view
that I'd have to make a reference to it in order to use it...
Furthermore, it might be wiser to put on a prefix to suggest that
these are users, something like:
groups:
userpginfo = ReturnsZero(/bin/sh -c "/usr/bin/whoami | grep pginfo")
userpostgres = ReturnsZero(/bin/sh -c "/usr/bin/whoami | grep postgres")
usercbbrowne = ReturnsZero(/bin/sh -c "/usr/bin/whoami | grep cbbrowne")
There is certainly some risk of having user names that are the same as
class names...
--
(reverse (concatenate 'string "ofni.sailifa.ac" "@" "enworbbc"))
<http://dba2.int.libertyrms.com/>
Christopher Browne
(416) 673-4124 (land)
- Determining user ID, Christopher Browne, 2005/12/20
- Message not available
- Re: Determining user ID,
Christopher Browne <=