LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-11-2015, 07:36 AM   #1
atelszewski
Member
 
Registered: Aug 2007
Distribution: Slackware
Posts: 948

Rep: Reputation: Disabled
/proc and hidepid (hide processes of other users)


Hi,

I just thought that I share with you what I have just found. Currently I'm testing this option, but as my system is not running many services nor it has many users, I cannot tell how hard and how helpful/harmful it could be.

Since kernel 3.2+ (http://tuxdiary.com/2014/08/23/hidepid/), the /proc can be mounted with hidepid option, which basically hides all the processes run by other users. I placed it in rc.local:
Code:
/sbin/mount -oremount,hidepid=2,gid=showpid /proc
I have added additional group showpid (currently empty), that enables all the users belonging to this group to view all the processes in the system. This might be needed for services that are not running as root but need to learn about processes of different users.

This option might not be well known, as searching through LQ brings no results.
You can find more info trying to search using your favourite web search service

After enabling this option, try ps aux or going into /proc and you'll notice how clean they look

BTW, as always, root can see everything...

--
Best regards,
Andrzej Telszewski
 
Old 09-12-2015, 05:28 AM   #2
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
Cool. I learned something new today. Thanks!
 
Old 08-24-2018, 01:57 PM   #3
orbea
Senior Member
 
Registered: Feb 2015
Distribution: Slackware64-current
Posts: 1,950

Rep: Reputation: Disabled
Old thread, but does someone know why this doesn't work when put in /etc/fstab with Slackware 14.2? Remounted like in /etc/rc.d/rc.local works, but I'm a bit confused why /etc/fstab is not being respect for /proc?
 
Old 08-24-2018, 06:37 PM   #4
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
It might be mounted with other options in the initrd.
 
Old 08-25-2018, 08:16 AM   #5
orbea
Senior Member
 
Registered: Feb 2015
Distribution: Slackware64-current
Posts: 1,950

Rep: Reputation: Disabled
Thanks! That seems quite plausible. I unpacked my initrd.gz and found this.
Code:
# Mount /proc and /sys:
mount -n proc /proc -t proc
mount -n sysfs /sys -t sysfs
mount -n tmpfs /run -t tmpfs -o mode=0755,size=32M,nodev,nosuid,noexec
 
  


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
ps - hide processes belongs to other users dlugasx Linux - Security 8 12-23-2011 11:45 PM
[SOLVED] /proc/pid/maps files empty for all processes alexroux Linux - Kernel 6 02-16-2010 10:05 AM
hide processes cad Linux - Security 24 01-14-2007 07:04 AM
Is it possible to hide users from the 'who' and 'w' commands? BxBoy General 8 03-30-2003 01:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:08 AM.

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