LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-30-2005, 10:30 AM   #1
heraklez
LQ Newbie
 
Registered: May 2005
Location: Peru
Distribution: Slackware
Posts: 26

Rep: Reputation: 15
squid question


Hello, I am installing squid on my machine, and I read Tomasz Chmielewski How To. He says that I should create secure squid user:

useradd -d /cache/ -r -s /dev/null squid >/dev/null 2>&1

I would like to know what is the meaning of this.
I read the useradd man page but I don't see the -r option.
Why does "-s" points to /dev/null?
 
Old 07-30-2005, 12:40 PM   #2
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
i don't know what the -r is for... i've never used it, and like you said, it doesn't show up in the manual...

-s is given /dev/null so that the account will have an invalid shell... most distros come with a /bin/false binary which is made specially for this... for example, this is what i use to add an account for squid in slackware
Code:
groupadd squid

useradd -g squid -d /cache -s /bin/false squid
just my ...
 
Old 07-30-2005, 01:50 PM   #3
heraklez
LQ Newbie
 
Registered: May 2005
Location: Peru
Distribution: Slackware
Posts: 26

Original Poster
Rep: Reputation: 15
Thank you very much Win32sux. I have another question:
I have a directory called /opt/squid/sbin, it contains squid executable.
There is another directory called /opt/squid/bin, and it contains RunCache, RunAccel, squidclient.
I do cat /opt/squid/bin/RunCache, and it show this:
#!/bin/sh
#
#$Id: RunCache.in,v 1.9.8.1 2003/01/06 20:52:55 wessels Exp $

prefix=/opt/squid
exec_prefix=/opt/squid
logdir=${prefix}/var
PATH=${exec_prefix}/sbin:/bin:/usr/bin
export PATH

conf=""
if test "$1" ; then
conf="-f $1"
shift
fi

failcount=0
while : ; do
echo "Running: squid -sY $conf >> $logdir/squid.out 2>&1"
echo "Startup: `date`" >> $logdir/squid.out
start=`date '+%d%H%M%S'`
squid -NsY $conf >> $logdir/squid.out 2>&1
stop=`date '+%d%H%M%S'`
...... etc.


Now my question is this: is RunCache a link to squid?
 
Old 07-30-2005, 02:53 PM   #4
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
Quote:
Originally posted by heraklez
is RunCache a link to squid?
no, it's a shell script...
Quote:
Squid is normally run by starting the RunCache script. RunCache... restarts Squid if it dies for some reason...
http://squid-docs.sourceforge.net/latest/html/x897.html

Quote:
The RunCache program attempts to restart Squid if it dies for some reason, and logs basic Squid debug output both to the file "/usr/local/squid/squid.out" and to syslog.
http://squid-docs.sourceforge.net/la...tml/x1013.html


AFAIK most people don't use the RunCache script...

Quote:
I have a directory called /opt/squid/sbin, it contains squid executable.
There is another directory called /opt/squid/bin, and it contains RunCache, RunAccel, squidclient.
just curious: why aren't you using the traditional slackware locations like /usr/sbin and /usr/bin for those??


Last edited by win32sux; 07-30-2005 at 03:02 PM.
 
  


Reply



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
squid question ilnli Linux - Software 2 11-13-2005 11:54 PM
squid question bluesky2005 Linux - Software 6 04-09-2005 02:33 PM
Squid Question offaxis Linux - Networking 1 09-27-2004 07:46 PM
Squid Question offaxis Debian 1 09-27-2004 04:03 PM
Squid question andresurzagasti Linux - Networking 1 09-13-2002 04:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:32 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