LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > General
User Name
Password
General This forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!

Notices

Reply
 
Search this Thread
Old 03-27-2003, 08:50 PM   #1
BxBoy
Member
 
Registered: Oct 2002
Location: New York City (nYc)
Distribution: Red Hat Enterprise 3
Posts: 93

Rep: Reputation: 15
Is it possible to hide users from the 'who' and 'w' commands?


Is it possible to omit users from being displayed with the 'who' and 'w' commands? Like for instance, I would like to omit the 'root' users from being displayed.
 
Old 03-27-2003, 11:07 PM   #2
MasterC
Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
According to the man page, I can't find anything on omitting a user, however you can specify a user:
w user username

So:
w user masterc
would tell you if I was logged into your machine and where

Cool
 
Old 03-27-2003, 11:11 PM   #3
BxBoy
Member
 
Registered: Oct 2002
Location: New York City (nYc)
Distribution: Red Hat Enterprise 3
Posts: 93

Original Poster
Rep: Reputation: 15
Yeah, but I'd like to omit users like 'root', so I can maintain my system while the users log in. I don't want them to know that I'm logged in.

Better yet, is there a source code for the 'w' or 'who' commands? I know a little programming, so maybe I can modify it and recompile it.
 
Old 03-27-2003, 11:26 PM   #4
BxBoy
Member
 
Registered: Oct 2002
Location: New York City (nYc)
Distribution: Red Hat Enterprise 3
Posts: 93

Original Poster
Rep: Reputation: 15
Nevermind. I thought of an ingenius way to do it!
 
Old 03-28-2003, 12:21 AM   #5
MasterC
Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
Any insight?
 
Old 03-28-2003, 03:26 PM   #6
crokett
Member
 
Registered: Feb 2003
Distribution: Fedora 13
Posts: 92

Rep: Reputation: 15
Quote:
Originally posted by MasterC
Any insight?
Well a hack would be to alias the command to a shell script that pipes the output to a sed for root which deletes it before displaying the list to the user. The users don't know the difference.
 
Old 03-28-2003, 07:45 PM   #7
cuckoopint
Member
 
Registered: Feb 2003
Distribution: Debian
Posts: 797

Rep: Reputation: 30
Quote:
Well a hack would be to alias the command to a shell script that pipes the output to a sed for root which deletes it before displaying the list to the user. The users don't know the difference.
heh. that's what I was thinking while reading this thread. But I was thinking maybe a simple grep -v
 
Old 03-29-2003, 10:28 PM   #8
macewan
Senior Member
 
Registered: Jan 2002
Distribution: Ubuntu, Debian
Posts: 1,055
Blog Entries: 1

Rep: Reputation: 45
or a root kit
 
Old 03-30-2003, 02:33 AM   #9
doublefailure
Member
 
Registered: Mar 2002
Location: ma
Distribution: slackware
Posts: 747

Rep: Reputation: 30
Quote:

heh. that's what I was thinking while reading this thread. But I was thinking maybe a simple grep -v
--V
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
to hide users from 'net' Ygrex Linux - Networking 0 11-24-2005 12:20 PM
Hide your commands from viewers stefaandk Linux - General 4 08-09-2005 11:06 PM
FTP Server Up and running... how do I hide ftp users from local login screen? joe1031 Mandriva 2 03-18-2005 05:24 PM
commands to Add Users bickyz Linux - Networking 2 11-12-2004 10:13 AM
samba: hide shares from some users v3rb0 Linux - Software 4 08-10-2003 02:12 AM


All times are GMT -5. The time now is 05:04 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration