[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Devices and permissions

On Wed, 2004-10-20 at 09:44 +0200, Alain PORTAL wrote:
> Hash: SHA1
> Le samedi 16 Octobre 2004 11:06, Aurelien Bompard a écrit :
> > Harald Hoyer wrote:
> > > let the program run as user <myuser>
> > > put <myuser> in group lp  and uucp in /etc/group
> >
> > I think the program is a client application, not a server. Thus we can't
> > really have it run as another user.
> >
> > I guess it's possible for a client application to use the serial ports,
> > isn't it ? So how can we do that ?
> Nobody has any idea?

So is it a client or a server application? If it's a client application,
all users who want to use it must have the permissions, either by
belonging to a special group or /etc/security/console.perms trickeries.
If it's a server application, you could let it be run by e.g. the
"myserverapp" user (with an exemplary uid/gid of 450 -- I don't know
whom you should ask to get a fixed well known one assigned for FC) which
would get added/removed like this in packages:

# Don't fail if user/group already exist
groupadd -g 450 myserverapp || :
useradd -u 450 -g 450 -G uucp,lp myserverapp -d /usr/lib/myserverapp || :

if [ "$1" = "0" ]; then
	userdel -r myserverapp || :
	groupdel -r myserverapp || :

     Nils Philippsen    /    Red Hat    /    nphilipp redhat com
"They that can give up essential liberty to obtain a little temporary
 safety deserve neither liberty nor safety."     -- B. Franklin, 1759
 PGP fingerprint:  C4A8 9474 5C4C ADE3 2B8F  656D 47D8 9B65 6951 3011

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]