LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 11-09-2010, 09:24 AM   #1
Stranges
LQ Newbie
 
Registered: Jan 2008
Posts: 1

Rep: Reputation: 0
Remote Login to Restart CUPS


Greetings,

First of all, this is my first post so I apologize if I have mis-categorized it.

I am creating a process where a non-technical user can log into Putty and a login script will automatically restart CUPS, display a message with enough time for them to read it and then log them out.

Criteria:
1. An icon for Putty will be placed on a Windows desktop.
2. Login credentials will be saved in putty.
3. When they log in, the login script will execute with no interaction from the user.
4. Script closes.
5. OS = Red Hat ES5
6. Linux user = ptradmin

I can perform steps 1 and 2 with no problem. I even know how to restart CUPS as root. The problem is when I log in as ptradmin and restart CUPS, I get a "rm: cannot remove /'/var/run/cups': Permission denied"

So it's obvious that the ptradmin user does not have permission to restart CUPS.

It appears I need to allow the ptradmin user the right to restart CUPS. Once that is done, a login script will need to be developed.

My knowledge of Linux is limited so please dumb down the concepts.

If you need any additional info, let me know.

Thanks,
Bryan
 
Old 11-09-2010, 10:24 AM   #2
sarin
Member
 
Registered: May 2001
Location: India, Kerala, Thrissur
Distribution: FC 7-10
Posts: 354
Blog Entries: 2

Rep: Reputation: 34
1. Write a script for what you want to do
2. Make is accessible by the prtadmin user (read and execute, but no write)
3. Setup sudo for prtadmin user for executing that script without any password
4. From his .bashrc or something call this script using sudo. Make use of trap to avoid signals OR
5. Write a C program to call the script and put that as his/her shell. Make sure that your C program is secure enough
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
cups not running after /etc/rc.d/rc.cups restart janhe Slackware 1 09-26-2007 10:26 AM
Restart a jobs in CUPS in Slackware 11.0 Slim Backwater Slackware 0 11-07-2006 12:49 PM
What is the command to restart cups in fedora 4? sleekmason Linux - Newbie 3 03-27-2006 01:05 AM
Remote Restart Tomcat PerfectReign Linux - Security 2 05-16-2005 11:33 AM
remote cups printing to a smb/cups print server? justanothergeek Linux - Networking 2 09-15-2004 08:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 04:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration