LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 12-12-2017, 09:56 AM   #1
sigint-ninja
Member
 
Registered: Feb 2011
Location: Republic Of Ireland
Distribution: Debian,Centos,Slackware
Posts: 508

Rep: Reputation: 29
Doesnt it defeat security purposes though?


reading this...

example, the situation where a user needs to change his password. To
do this, the user needs to write his new password to the /etc/shadow file. This file,
however, is not writeable for users who do not have root permissions.

SUID permission offers a solution for this problem. On the /usr/bin/passwd
utility, this permission is applied by default. That makes that when changing his
password, the user temporarily has root permissions, which allows him to write to
the /etc/shadow file.

does this not make it possible for anybody to write any password to /etc/shadow...i men isnt it a security compromise for convenience?
 
Old 12-12-2017, 09:59 AM   #2
sigint-ninja
Member
 
Registered: Feb 2011
Location: Republic Of Ireland
Distribution: Debian,Centos,Slackware
Posts: 508

Original Poster
Rep: Reputation: 29
then further read this...

The SUID permission may look useful (and it is in some cases), but at the same
time, it is potentially dangerous. If applied wrongly, you may give away root permissions
by accident. I therefore recommend using it with greatest care only. Most
administrators will never have to use it; you’ll only see it on some files where the
operating system needs to set it as a default.

so is it advisable to turn off this SUID permission for specific utilities?
would an admin typically write a security script to change certain default security settings?

was just curious...
 
Old 12-12-2017, 10:03 AM   #3
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
Moved: This thread is more suitable in Security and has been moved accordingly to help your thread/question get the exposure it deserves.
 
Old 12-12-2017, 06:35 PM   #4
ntubski
Senior Member
 
Registered: Nov 2005
Distribution: Debian, Arch
Posts: 3,781

Rep: Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081
Quote:
Originally Posted by sigint-ninja View Post
does this not make it possible for anybody to write any password to /etc/shadow
Only if the person who wrote /usr/bin/passwd effed up.

Quote:
...i men isnt it a security compromise for convenience?
It means your Trusted computing base becomes bigger, but what is the alternative? (that's not a rhetorical question, there may well be reasonable alternatives)
 
Old 12-13-2017, 08:45 AM   #5
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941
Also, the utility works in the way that it does even though sometimes the system isn't using "shadow files."

The most important thing is to make sure that you know which files have the suid bit set, and that none of those program-files are writable.
 
  


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
LXer: Day of Defeat and Day of Defeat: Source beta on Steam for Linux! LXer Syndicated Linux News 0 03-14-2013 05:50 PM
Actual benefit of Backtrack over Ubuntu for security purposes. Steviepower Linux - Distributions 7 05-15-2012 07:05 AM
Best Linux for...security purposes? :P blackjack90 Linux - Newbie 2 02-01-2006 09:25 AM
apt-get doesnt get security update gongli Debian 4 04-14-2004 08:56 PM

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

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