LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 08-01-2012, 04:35 PM   #1
Catalyph
LQ Newbie
 
Registered: Aug 2012
Posts: 2

Rep: Reputation: Disabled
Server Services start after login and remain running


I would like to have my server boot up and the only service to start be SSH.
On a particular user has logged in then other services will start and remain started until the next reboot.

My goal is to have data available via Network share only after the admin has logged into the system.
The main data storage device will be encrypted.

If the machine is removed or powered off from it's location the data will not be accessible until the certain user logs in.

Basically once this user logs in, the system will mount, decrypt and share via SMBD the drive, and those services will remain running even after the user has logged out.
 
Old 08-06-2012, 07:26 AM   #2
r0b0
Member
 
Registered: Aug 2004
Location: Europe
Posts: 608

Rep: Reputation: 50
Hi Catalyph and welcome to LQ!

I would set all the services not to be started on boot
Code:
update-rc.d mysql disable
Then I would write a shell script to start all the services (in the correct order, asking for necessary passwords and such). Then I would either run the script manually on logon or add it to .profile file to be executed automatically.

R.
 
Old 08-06-2012, 07:36 AM   #3
414N
Member
 
Registered: Sep 2011
Location: Italy
Distribution: Slackware
Posts: 647

Rep: Reputation: 189Reputation: 189
But what distro are you running on the server machine?
 
Old 08-06-2012, 03:11 PM   #4
Catalyph
LQ Newbie
 
Registered: Aug 2012
Posts: 2

Original Poster
Rep: Reputation: Disabled
Actually I figured it out.
I was using ubuntu server 11.10
What I did was go into /etc/init and opened the service in this case smbd.conf in vi
In the service conf script one of the first lines is

Quote:
Stop in runlevel [!2345]
I took out the ! (not) so it became:
Quote:
Stop in runlevel [2345]
Then I went the the .bashrc file in the user home folder and added encryption mount and start the smbd service

So now I have a Server that if it is unplugged (by a thief) and stolen, they will not be able to get my data unless they know the password for my account which is fairly robust.

When i log into the server the encrypted volume is mounted using a keyfile I created and added to the keyslot of the encrypted drive.
and then the smbd service is started to a directory where the mounted encrypted drive is.

it requires me to enter my user password 2 times ( once for log in and then for sudo mount) which is pretty good and i'm satisfied.

Last edited by Catalyph; 08-06-2012 at 08:57 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
Start services without user login - Centos 5.5 Nick_N Linux - Server 1 10-04-2010 03:29 PM
how do i know what services are running on my linux server? joshua777 Linux - Newbie 5 07-06-2010 08:04 PM
start services at boot not login? android6011 Linux - General 1 03-10-2008 03:09 PM
How do I setup a mail, proxy and file server running the listed services? ichauya Linux - Newbie 1 02-08-2008 12:15 PM
How to prune a print & file server to leave minimal services running wolfpeach Linux - Security 4 06-29-2004 06:35 AM

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

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