LinuxQuestions.org
Visit Jeremy's Blog.
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 07-23-2015, 07:18 PM   #1
Daravon
Member
 
Registered: Mar 2006
Posts: 170

Rep: Reputation: 15
user/group setup for DAQ


I run a shared RH server at work. I recently added a standalone data aquisition box, and since it could be an attack vector, I want to be smart about securing it.

Security of the DAQ itself doesn't matter. It runs Debian. Because the DAQ is used by technicians, it has autologin and public password. The scary part is that it needs to upload data to the RH web site at odd intervals, but I don't want anyone, even if they root the DAQ system, to be able to cause trouble on the RH server.

Right now the DAQ shared user is user Bob that does not exist on the server. It rsyncs the data to the webserver through ssh. When it does so, it ssh's as a user Charlie on the RH server with public key auth. The directory in the web root for the data and the files there are owned and grouped Charlie; Charlie is not in any other groups including the web- users group.

In principle now the entire world can log onto the webserver via ssh as Charlie. I am looking for suggestion on how to do this differently, or better sandbox that user. The only thing Charlie should be allowed to do is rsync legitimate data files to 1 directory in the web root. Can I remove Charlie's shell altogether and still allow him to use rsync?

Last edited by Daravon; 07-23-2015 at 07:29 PM.
 
Old 07-24-2015, 11:42 AM   #2
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
Any chance you can reverse the ssh direction, so the DAQ is a stand-alone system and a user on the RH server automatically rsyncs the data from the DAQ?
 
Old 08-01-2015, 10:52 PM   #3
Daravon
Member
 
Registered: Mar 2006
Posts: 170

Original Poster
Rep: Reputation: 15
I considered that, but I want the data available on the server within seconds of measurement. The only thing I could think to do was run a cron script on the server to rsync every 30 seconds or something but that is a lot of unneeded processing considering the DAQ may be off for days at a time and only does a measurement every 10 minutes in use. Maybe that would be OK though.
 
Old 08-02-2015, 08:36 AM   #4
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
Understandable. How about if the DAQ sends the data to an unprivileged and jailed account who can only see its own home directory and supporting directories with no shell access? You can use jailkit to set this up easily.

The DAQ would use sftp to dump the file to the jailed user's home, then you have a second script running as Charlie go grab those files when they appear and put them in the proper location in the web root.

You'd want to sanitize the files to make sure there isn't anything malicious in them, but you'd have to do that regardless.
 
Old 08-03-2015, 01:07 PM   #5
Daravon
Member
 
Registered: Mar 2006
Posts: 170

Original Poster
Rep: Reputation: 15
I will look into jailkit. I do not currently know how to jail users.
 
  


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
Spacewalk 2.2 setup-spacewalk errors: cannot add tomcat user to apache group Thaidog Linux - Server 3 01-19-2015 12:44 AM
User is a Part of a Group But Group Details Do Not Show the User devUnix Linux - Server 6 08-08-2013 07:02 AM
Changing Group user to anther group vidyasagar6 Linux - Server 2 12-04-2012 07:06 PM
[SOLVED] user removed from one group can still get that group's permission LanFan.BlueSailor Linux - Security 11 08-23-2012 12:32 AM
Group permissions: user can't access 770 directory even though a member of group jm34003 Linux - Security 13 05-16-2012 02:03 PM

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

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