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 - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-01-2012, 03:30 PM   #1
fakie_flip
Senior Member
 
Registered: Feb 2005
Location: San Antonio, Texas
Distribution: Gentoo Hardened using OpenRC not Systemd
Posts: 1,495

Rep: Reputation: 85
rpm -a --setugids; rpm -a --setperms;


Code:
[bull:~]$ ls -l /usr/bin/ping
-rwxr-xr-x. 1 root root 40912 Jan 25  2012 /usr/bin/ping
[bull:~]$ sudo rpm --setugids iputils                         
[sudo] password for bull: 
[bull:~]$ ping -c 2 google.com
ping: icmp open socket: Operation not permitted
[bull:~]$ sudo chmod u+s /usr/bin/ping 
[bull:~]$ ping -c 2 google.com         
PING google.com (74.125.227.97) 56(84) bytes of data.
64 bytes from dfw06s16-in-f1.1e100.net (74.125.227.97): icmp_req=1 ttl=50 time=37.9 ms
64 bytes from dfw06s16-in-f1.1e100.net (74.125.227.97): icmp_req=2 ttl=50 time=34.9 ms

--- google.com ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 34.959/36.462/37.966/1.515 ms
[bull:~]$
rpm -a --setugids; rpm -a --setperms;

These commands seem safe, right? rpm will look at each individual package and set permissions according to the rpm package says they should be. I ran these as advised for post upgrade of fedora (for me, 16 to 17). Then why after using this, 'su -' will fail to login as user as root because it is missing SUID, ping fails as unprivileged user, etc?

My friend did a fresh installation of Fedora 17, not an upgrade. By default, his /usr/bin/ping did not have SUID and worked, but after he ran:

Code:
rpm --setperms iputils
rpm --setugids iputils
His ping no longer worked, and SUID was not enabled as before.

  1. Please give me an explanation
  2. Why did his (my friend) ping work without SUID the first time?
  3. I ran this for the entire system. Now how am I going to fix it? If I knew the explanation why this is happening, but ping works on a fresh f17 install without SUID, I could probably find the solution. (Note: Even su -, missing the SUID will not and did not work with the correct root password, as well as many other files and permissions)
This issue is not related to SELinux. I have it set to Permissive, so it is not causing the problems.
 
  


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
error in building rpm of open ldap from source using rpm package manager Infotechie Linux - Software 2 05-02-2012 01:10 AM
installed apache from source, didn't remove rpm, updated rpm causes problems leftPeg Linux - Newbie 5 06-06-2007 09:20 PM
counter part of "rpm -ivh --force kernel....rpm in slackware b0nd Slackware 2 01-28-2006 07:46 PM
rpm error only says"rpm: relocation error: rpm: undefined symbol: poptAliasOptions" dlrsims Linux - Newbie 2 11-14-2003 09:22 PM
.src.rpm, .i386.rpm and .i686.rpm hhegab Linux - Software 2 06-19-2003 07:19 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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