Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 1 Apr 2005 20:02:45 +0200
From:      Roland Smith <rsmith@xs4all.nl>
To:        Martin McCormick <martin@dc.cis.okstate.edu>
Cc:        freebsd-questions@freebsd.org
Subject:    Re: Best Practice for Allowing non-root Users Access to Serial Port?
Message-ID:  <20050401180245.GB84746@slackbox.xs4all.nl>
In-Reply-To: <200504011717.j31HHE9S080897@dc.cis.okstate.edu>
References:  <200504011717.j31HHE9S080897@dc.cis.okstate.edu>

next in thread | previous in thread | raw e-mail | index | archive | help

--RASg3xLB4tUQ4RcS
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Apr 01, 2005 at 11:17:14AM -0600, Martin McCormick wrote:
> 	What is the safest way to let non-root users access
> /dev/ttyd0?  I notice that in FreeBSD, /dev/ttydx is owned by
> root:wheel.  In linux, the ttySx's are in a special group so the trick
> there is to add users to that group and make sure the ttyS's are group
> writable.
>=20
> 	Here, I want the users to be able to use C-kermit to talk to a
> remote device without them having to be root.

Since you want to dial out, I think you'll need to use /dev/cuaa*.

Making kermit users members of a group, and have that group own
/dev/cuaa* with read/write privileges seems like a good idea.

For instance, create a group "kermit" with 'pw groupadd kermit'. Then
you can use devfs(8) to change the ownership and permissions of the
relevant device: "devfs rule add path 'cuaa*' mode 0660 group
kermit". This setting will not survive a reboot, so you'll have to add the
following to /etc/devfs.rules: "add path 'cuaa*' mode 0660 group kermit".

Now add the relevant users to the group kermit:=20
'pw groupmod kermit -m foo,bar,baz'

Roland
--=20
R.F. Smith                           /"\    ASCII Ribbon Campaign
r s m i t h @ x s 4 a l l . n l      \ /    No HTML/RTF in e-mail
http://www.xs4all.nl/~rsmith/         X     No Word docs in e-mail
public key: http://www.keyserver.net / \    Respect for open standards

--RASg3xLB4tUQ4RcS
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (FreeBSD)

iD8DBQFCTYzFEnfvsMMhpyURAqZbAKCLENdHH6OUFXEMtahOSp8xPtzjZgCgpy0z
QWZ9R1wVp8F/cMKRC65IYe0=
=aiju
-----END PGP SIGNATURE-----

--RASg3xLB4tUQ4RcS--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050401180245.GB84746>