2 #This won't work on an RPM based distro. Easy to fix though.
3 sudo apt-get install xclip xvkbd wmctrl xvfb libqt4-dbg icewm #svn pylint
4 sudo adduser keytest < /dev/null
6 if ! grep keytest /etc/sudoers
8 echo allowing admin users to switch to keytest user
9 #echo '%adm ALL =(keytest) NOPASSWD: ALL' >> /etc/sudoers
11 # cat /mnt/jaunty/etc/cups/printers.conf |grep -o '[^ ]*>$' |grep -v '^<'| sed 's/>$//'
13 #we should really handle each printer seperately, but this will work if they are similar
14 if grep AllowUser /etc/cups/printers.conf
16 echo printer: using whitelisting, nothings needs be done.
20 if grep DenyUser /etc/cups/printers.conf
22 echo There are already denied users. We do not support this yet, exiting
26 #(cd /etc/cups/ppd/ && ls *.ppd) | sed s/.ppd$// | while read L
27 cat /etc/cups/printers.conf |grep -o '[^ ]*>$' |grep -v '^<'| sed 's/>$//' | while read L
30 echo lpadmin -p $L -u deny:keytest
31 lpadmin -p $L -u deny:keytest