OOOOPPPS!!!!
I realized how silly my question was after I got the first answer. The
problem is not the lpadmin command, but that I was running
it on csh and this shell gives a special meaning to ! (command history
recall).
The solution was to escape it, preceding it with a \
or run it from another shell (ksh, or sh).
Thanks to all this who kindly answered:
Gavin L. Hemphill
Peter Allan
Moshe Meirzadeh
Jens Fischer
Gavin Brennan
Wilter Borba
Shriman Gurung
Claude Charest
Michal Dombrowsk
Peter Asboeck
Matthew Stier
Igor Kolker
Kevin M. Woods
Bob Cronin
Sandra Stefani
Kamal Kantawala
Burt Heymanson
Myk O'Leary
John D. Groenveld
Glenn Satchell
ORIGINAL QUESTION:
>
> I want to restrict access to certain printers from certain
> systems. According to the manual, and to the lpadmin man page, I should
> be able to do: lpadmin -p printername -u allow: list
> where list is a list of system-users allowed to use the printer.
>
> According to the manual pages, list can be a list of:
> > login-ID a user on any system
> > system-name!login-ID
> > a user on system system-name
> > system-name!all
> > all users on system system-name
> > all!login-ID a user on all systems
> > all all users on all systems
> >
>
> When I try to issue the command:
> lpadmin -p iprinter -u allow:itserver!all
> I get the following error
> all: Event not found
>
> If I try to issue the command:
> lpadmin -p itprinter -u allow:all!mariel
> I get the following error
> mariel: event not found
>
> If I issue the command with a user name, for example:
> lpadmin -p itprinter -u allow:mariel
> it works fine.
> lpadmin -p iprinter -u allow:all
> also works fine.
>
> The problem seems to happen when there is a ! involved. But the
> manual says that's the way to handle. Maybe this is a bug solved in a
> patch, or maybe I am doing something wrong.
-- =============================Mariel Feder unix.support@meralco.com.ph
Phone: (63) (2) 632.8862 / 632.8977 / 632.2318 Fax: (63) (2) 632.8868
Meralco Electric Company Distributed Information Technology Team Manila - Philipines
=============================
This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:11:58 CDT