LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora > Fedora - Installation
User Name
Password
Fedora - Installation This forum is for the discussion of installation issues with Fedora.

Notices



Reply
 
Search this Thread
Old 05-22-2004, 11:57 PM   #1
Boss Hoss
Member
 
Registered: Sep 2003
Distribution: SuSe
Posts: 62

Rep: Reputation: 15
disable CUPS and SAMBA


Since I am running my 1U as a hotsing server (Ensim Webppliance) I was told I should not have CUPS or SAMBA running on bootup since this is more for a desktop deployment.

How do I turn them off from ssh?
How do I change the config through ssh so that these don't start up on boot?
 
Old 05-23-2004, 02:32 AM   #2
RolledOat
Member
 
Registered: Feb 2003
Location: San Antonio
Distribution: Suse 9.0 Professional
Posts: 843

Rep: Reputation: 30
http://techrepublic.com.com/5100-6270-1053043.html
Users logged on as root can turn off a service by entering the path name for the service script followed by the stop option. For example, to turn off nfs, enter: # /etc/init.d/nfs stop.
Note that Red Hat versions of Linux may use the path: /etc/rc.d/init.d instead.

Going by your distro, RH7.3 in your profile, I think
service stop cupsd (going from memory from about 1 1/2 years ago)

I don't remember if that is permanent. On the local machine,
xhost + <IP of remote machine>
ssh <ip of remote machine> as a user
su - root (on remote machine. You don't allow root to ssh do you, if so, change that. /etc/ssh/sshd_config and change PermitRootLogin to no)
export DISPLAY=localmachineip:0.0

then you can spawn the GUI tool for controlling services on the remote machine and have it display locally.

RO
 
Old 05-23-2004, 10:12 AM   #3
Boss Hoss
Member
 
Registered: Sep 2003
Distribution: SuSe
Posts: 62

Original Poster
Rep: Reputation: 15
I corrected my distro..I'm using FedoraCore1 now.

#service cups stop works for ssh

Now how do I make it so cups doesn't come up on reboot - remotely through shell?
 
Old 05-23-2004, 01:08 PM   #4
RolledOat
Member
 
Registered: Feb 2003
Location: San Antonio
Distribution: Suse 9.0 Professional
Posts: 843

Rep: Reputation: 30
In my post, I showed how you can run a GUI program on the remote machine, but see it display

on the local machine
xhost + <IP of remote machine>
ssh <ip of remote machine> as a user
su - root
export DISPLAY=localmachineip:0.0

Then, I believe that FC1 it was still called
redhat-config-services
This will start the GUI control of services on the remote machine, but display locally. This is a nice thing to know in general.

A few more thoughts. If you haven't, install a more complete firewall (firestarter is a good one), then block all ports except the ones that are needed. You can also block port 22 (SSH) for all IPs except the one(s) that you remote ssh in from.

RO
 
Old 05-23-2004, 01:18 PM   #5
motub
Senior Member
 
Registered: Sep 2003
Location: The Netherlands
Distribution: Gentoo (main); SuSE 9.3 (fallback)
Posts: 1,607

Rep: Reputation: 46
That is a nice thing to know in general! Thanks...adding it to my collection of tips and tricks right now !
 
Old 05-23-2004, 01:32 PM   #6
Boss Hoss
Member
 
Registered: Sep 2003
Distribution: SuSe
Posts: 62

Original Poster
Rep: Reputation: 15
Sorry I'm a newbie so i didn't understand that clearly. Also since I'm an hour away from the server, I'm reluctant to do anything I'm not sure of that might take the server down.

I recently had some troubles with the server, a HD was going bad and after trying to come up with a new one, we ended up replacing the MB because things were'nt making sense on reboot. It took away my nice Fedora graphical startup and I get errors when it tries to go to graphical mode..so I go back to text mode. So I'm unsure if this issue would give me a problem doing what you're saying to do.

Is there a way to do this with vi ?

I had a sysadmin friend install iptables but haven't studied it enough to make alterations to it.
 
Old 05-23-2004, 01:45 PM   #7
RolledOat
Member
 
Registered: Feb 2003
Location: San Antonio
Distribution: Suse 9.0 Professional
Posts: 843

Rep: Reputation: 30
The remote GUI should still work, it will run on the local X session (the export part), not the X that isn't running on the remote machine. I don't know how to do it using vi.

Did a little more searching. See if ntsysv is still included. This is a console tool to edit runlevels. Here is the link from Redhat 7.1

http://www.redhat.com/docs/manuals/l...-services.html
"The ntsysv interface works like the text-mode installation program."

I can guarantee that there is a console tool to edit runlevels, I just wouldn't know what it is called. maybe a new thread with "Fedora: control services through without running X".

RO
 
Old 05-23-2004, 01:53 PM   #8
motub
Senior Member
 
Registered: Sep 2003
Location: The Netherlands
Distribution: Gentoo (main); SuSE 9.3 (fallback)
Posts: 1,607

Rep: Reputation: 46
From Common tasks and file locations on Red Hat Linux:
Quote:
Ensuring that a service is started after reboot
The services are stored in the directory /etc/rc.d/init.d/ these may be controlled using chkconfig, ntsysv and redhat-config-services. Please note that ntsysv and redhat-config-services use the current runlevel by default; however you can change this e.g. "ntsysv --level 345" which would make changes to runlevels 345. chkconfig is probably the easiest, you can use "chkconfig httpd on", which would set apache to start in runlevels 3,4 and 5.
So presumably, to ensure that a service is not started on reboot, you would want to either manually or using one of the tools listed (most likely chkconfig; that sounds very ncurses-y -- oh, it's not even ncurses, it's a command! -- but redhat-config-services may have a console mode as well) remove cups from /etc/rc.d/init.d.

Y'know, not to be a b*tch, but if you are supposed to be adminning a server, you really should get a handle on where the basic config files for the server live. You might also want to read man chkconfig, or look at some of the RedHat Manuals online.
 
Old 05-23-2004, 08:33 PM   #9
DavidPhillips
Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,155

Rep: Reputation: 56
login, then use these commands..


chkconfig cups off
chkconfig smb off

service cups stop
service smb stop
 
Old 05-23-2004, 08:44 PM   #10
Boss Hoss
Member
 
Registered: Sep 2003
Distribution: SuSe
Posts: 62

Original Poster
Rep: Reputation: 15
Bingo! thanks, I knew it was that easy.

BTW...clicked on aferro and got an error?

ratings::init() URL 'r' argument is not a valid user
 
Old 05-23-2004, 10:37 PM   #11
DavidPhillips
Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,155

Rep: Reputation: 56
I get the same error, thanks for reporting it. I will check into the problem.

 
Old 05-24-2004, 11:20 PM   #12
DavidPhillips
Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,155

Rep: Reputation: 56
Affero is working again, temporary problem.

 
  


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
Samba/Cups print sharing problems (/var/spool/samba files) Gates1026 Linux - General 9 06-23-2013 02:33 AM
CUPS auto-detects and shows remote queues, how to disable? tisource Linux - General 6 12-02-2005 10:37 PM
disable samba roaming profile egyptian Linux - Networking 1 08-04-2004 05:06 PM
Samba and CUPS ghuber Linux - Networking 0 12-11-2003 11:42 AM
disable SAMBA (SMB) printing akidd Linux - Networking 0 10-28-2003 05:02 PM


All times are GMT -5. The time now is 01:01 AM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration