Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Networking & Security
  • Search

User Security [SOLVED]

Having problems getting connected to the internet or running a server? Wondering about securing your box? Ask here.
Post Reply
Advanced search
9 posts • Page 1 of 1
Author
Message
Narusegawa
Apprentice
Apprentice
User avatar
Posts: 210
Joined: Tue Jun 29, 2004 9:28 am
Location: Bimringham, UK
Contact:
Contact Narusegawa
Website

User Security [SOLVED]

  • Quote

Post by Narusegawa » Wed May 17, 2006 10:09 am

I'm in the process of moving my webserver from FreeBSD to Gentoo. But at the moment I have a problematic user with shell access. I'm hoping this can be done in Gentoo (it might be able to do in FreeBSD too)

The user downloads BitchX binaries and runs them in his home dir. Is there a way to prevent said user doing so, without removing their shell access or wget/lynx etc...

Edit: Solved by deciding to not let users have shell access
Last edited by Narusegawa on Thu Jul 13, 2006 10:30 am, edited 1 time in total.
WARNING: It is a violation of federal law to use me in a way inconsistent with my labelling. I am dangerous to humans and domestic animals. Please avoid contact with your eyes and clothing. I should be stored out of the reach of children.
Top
Narusegawa
Apprentice
Apprentice
User avatar
Posts: 210
Joined: Tue Jun 29, 2004 9:28 am
Location: Bimringham, UK
Contact:
Contact Narusegawa
Website

  • Quote

Post by Narusegawa » Wed May 17, 2006 10:18 am

Thinking about it... I'd need to find one of 2 methods....

1) Prevent user running binaries outside that don't exist in /bin, /sbin /usr/

2) Force -x on ALL files in their home folder (They can only write to this folder)
WARNING: It is a violation of federal law to use me in a way inconsistent with my labelling. I am dangerous to humans and domestic animals. Please avoid contact with your eyes and clothing. I should be stored out of the reach of children.
Top
allucid
Veteran
Veteran
Posts: 1314
Joined: Sat Nov 02, 2002 6:27 pm
Location: atlanta

  • Quote

Post by allucid » Wed May 17, 2006 11:45 am

Is the user not allowed to run any local applications, not allowed to run specific applications, or is this a network issue? Make sure you fix the problem without crippling some of their privileges.
help support OpenSSH
Top
Narusegawa
Apprentice
Apprentice
User avatar
Posts: 210
Joined: Tue Jun 29, 2004 9:28 am
Location: Bimringham, UK
Contact:
Contact Narusegawa
Website

  • Quote

Post by Narusegawa » Wed May 17, 2006 12:25 pm

It was given to the user so that they could wget, tar and nano files in their web space. And so this is really all they should have access to.
WARNING: It is a violation of federal law to use me in a way inconsistent with my labelling. I am dangerous to humans and domestic animals. Please avoid contact with your eyes and clothing. I should be stored out of the reach of children.
Top
marvin5
Apprentice
Apprentice
User avatar
Posts: 162
Joined: Sat Mar 19, 2005 2:34 pm
Location: Germany

  • Quote

Post by marvin5 » Wed May 17, 2006 1:55 pm

How about mounting the home-directories with "noexec"? Check "man mount" for details. This should prevent the execution of everything on this partition.


marvin
Top
Narusegawa
Apprentice
Apprentice
User avatar
Posts: 210
Joined: Tue Jun 29, 2004 9:28 am
Location: Bimringham, UK
Contact:
Contact Narusegawa
Website

  • Quote

Post by Narusegawa » Thu May 25, 2006 4:11 pm

Is it possible then perhaps to specify a list of commands/binaries that the user CAN run?
WARNING: It is a violation of federal law to use me in a way inconsistent with my labelling. I am dangerous to humans and domestic animals. Please avoid contact with your eyes and clothing. I should be stored out of the reach of children.
Top
nlindblad
Guru
Guru
User avatar
Posts: 476
Joined: Thu Jun 30, 2005 1:07 pm
Location: Lund, Sweden
Contact:
Contact nlindblad
Website

  • Quote

Post by nlindblad » Thu May 25, 2006 4:17 pm

Narusegawa wrote:Is it possible then perhaps to specify a list of commands/binaries that the user CAN run?
Yes:

1) Use a Mandatory Access Control solution like Selinux.
2) Lock the user into a chroot upon login and only place the binaries he is allowed to use within the chroot.

Alternative 2 might be the easisest one.
Please provide detailed tracebacks and your emerge --info when posting compile errors.
Add [SOLVED] to the thread's topic if you feel that your question has been anwered or your problem is solved.
Top
Narusegawa
Apprentice
Apprentice
User avatar
Posts: 210
Joined: Tue Jun 29, 2004 9:28 am
Location: Bimringham, UK
Contact:
Contact Narusegawa
Website

  • Quote

Post by Narusegawa » Thu May 25, 2006 4:23 pm

That's a good idea, the problem is I want to allow wget, but then that allows user to get a binary into the chroot.

However it might be possible if I can force all folders of that chroot into having -x on all files automatically.
WARNING: It is a violation of federal law to use me in a way inconsistent with my labelling. I am dangerous to humans and domestic animals. Please avoid contact with your eyes and clothing. I should be stored out of the reach of children.
Top
nlindblad
Guru
Guru
User avatar
Posts: 476
Joined: Thu Jun 30, 2005 1:07 pm
Location: Lund, Sweden
Contact:
Contact nlindblad
Website

  • Quote

Post by nlindblad » Thu May 25, 2006 4:27 pm

Narusegawa wrote:That's a good idea, the problem is I want to allow wget, but then that allows user to get a binary into the chroot.

However it might be possible if I can force all folders of that chroot into having -x on all files automatically.
I would rather make sure the home directories in the chroot is on a separate partition and mounted with noexec, that way the user can't execute anything inside his home directory.

Also, make sure the binaries you do put in the chroot are in directories owned by root and not write-able.
Please provide detailed tracebacks and your emerge --info when posting compile errors.
Add [SOLVED] to the thread's topic if you feel that your question has been anwered or your problem is solved.
Top
Post Reply

9 posts • Page 1 of 1

Return to “Networking & Security”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy