Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Give user ability to enable a printer

Status
Not open for further replies.

mlmclean

IS-IT--Management
Jun 19, 2001
8
0
0
US
How can I give a user the ability to enable printers that "go down". I do not want them signing on as su. I've tried various combinations of groups and roles to no avail.

Thanks.
 
Assign the users to the printq group.
I am assuming the DOWN message is from queue status and you only have one device assigned to each queue.
Use enq -P LAS02 -U
Substitute your queue name for LAS02
You can verify the queue is up quickly with
enq -s -P LAS02

 
I tried adding them to the printq primary and administrative group. That did not solve my problem. Any other thoughts?
 
Can you be more specific then as to what the problem is?

Members of group "printq" have access to the "enable" command.
 
I solved the problem by setting administrative user to "true" and enrolling the users in "printq" group. Thanks for your help.
 
Does anyone here know how to write a script to do this so the user can enter the queue name and not have to enter the command?
 
Hi DTicky,

Assume that there r 3 depts. and in for each dept. there r 3 ques. The undermentioend script will give user option to choose between depts. and printer ques. The user can enable his/her desired que through this script without wntering the command. Change the print ques according to ur requirement.


while true
do
tput clear
echo "^[[4m Printer Status ^[[0m"
tput cud1
echo " Department A = 1 "
echo " Department B = 2 "
echo " Department C = 3 "
echo " Exit = 4 "
tput cud1
echo "Enter your choice : \c"
read opt
case $opt in
1) lpstat -ad1a,d1b,d1c | grep -v : | pg ;;
2) lpstat -ad2a,d2b,d2c | grep -v : | pg ;;
3) lpstat -ad3a,d3b,d3c | grep -v : | pg ;;
4) break ;;
esac
echo "Do you want to enable any que [Y/N] : \c"
read ans1
if [ $ans1 = "Y" -o $ans1 = "y" ]
then
tput cud1
echo "Enter que name to activate : \c"
read quenm
quenm=`echo $quenm | tr "A-Z" "a-z"`
if [ $opt = "1" ]
then
case $quenm in
d1a|d1b|d1c) disable d1a d1b d1c
enable $quenm ;;
*) echo "^[[5mInvalid que name^[[0m" ;;
esac
else
if [ $opt = "2" ]
then
case $quenm in
d2a|d2b|d2c) disable d2a d2b d2c
enable $quenm ;;
*) echo "^[[5mInvalid que name^[[0m" ;;
esac
else
if [ $opt = "3" ]
then
case $quenm in
d3a|d3b|d3c) disable d3a d3b d3c
enable $quenm ;;
*) echo "^[[5mInvalid que name^[[0m" ;;
esac
fi
fi
fi
fi
done

Best Regards,
vivek
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top