Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 07-17-2008, 05:14 PM   #1
Registered: Jul 2008
Posts: 35

Rep: Reputation: 15
cannot set to dev/null

I get this when trying to run this command: desktop:~$ grep nobody /etc/passwd
this "nobody" just popped up one day under my normal profile name and i cannot set it to /dev/null. I get permission denied.
Old 07-17-2008, 07:42 PM   #2
Senior Member
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
You are seeing this error because you don't have permission to edit the /etc/passwd file. Try changing to the root account or invoke an editor using sudo.

BUT ... the nobody account is useful. It is a standard account used to perform tasks that don't require any privileges or normal user account status. The updatedb utility is usually run in a cron job under the nobody account. That way it does not update the locate database with user files unless the "others" group can see those files.
Old 07-17-2008, 07:46 PM   #3
LQ Guru
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 261Reputation: 261Reputation: 261
I've seen apache run as nobody as well, along with many other services so they're not run as root.
Old 07-18-2008, 07:40 AM   #4
Registered: Jun 2008
Posts: 101

Rep: Reputation: 15
Why would you want to set user 'nobody' to /dev/null anyway? What's the purpose for that?

Linux Archive

Last edited by FranDango; 09-20-2008 at 06:10 AM.
Old 07-18-2008, 04:59 PM   #5
LQ Newbie
Registered: Jul 2008
Posts: 4

Rep: Reputation: 0
chsh, cli command will change login shell

Originally Posted by techemically View Post
i cannot set it to /dev/null. I get permission denied.
1. echo "/dev/null" >> /etc/shells
2. as user root type; chsh /dev/null nobody

See man chsh for explanation.
Old 07-19-2008, 11:00 AM   #6
Registered: Jul 2008
Posts: 35

Original Poster
Rep: Reputation: 15

i was told that With a shell of /dev/null, an attacker could not be certain whether the attempted user exists on the system -- not the case where /bin/false or /bin/nologin is the shell.

so i enter; su
then root passwd;
then; chsh /dev/null nobody
i get; Usage: chsh [options] [LOGIN]

-h, --help display this help message and exit
-s, --shell SHELL new login shell for the user account

to set nobody now to /dev/null do need to just enter; chsh /dev/null nobody -s?

also, are there any potential problems in doing so? sorry but i am VERY new to this.
Old 07-19-2008, 01:08 PM   #7
Senior Member
Registered: May 2004
Location: Leipzig/Germany
Distribution: Arch
Posts: 1,687

Rep: Reputation: 55
In light of these option-hints I think the command would have to be:
chsh -s /dev/null nobody
chsh --shell/dev/null nobody
Old 07-20-2008, 05:39 PM   #8
Registered: Jul 2008
Posts: 35

Original Poster
Rep: Reputation: 15
Thanks! :)

that did it! you guys are awesome. Since I have used MS systems for so long and support them professionally I am very unfamiliar with Linux in every aspect ( although i do have to say even being as new to it as i am, i am WAY happier to use it than any MS product i have ever seen). I am a pretty big security guy so if anyone could point me to some references on tools to be used in securing my Linux box i would appreciate it. Also, guarddog vs. firestarter, any opinions?
Old 09-06-2008, 11:56 PM   #9
LQ 5k Club
Registered: Oct 2003
Location: Western Australia
Distribution: debian IceWM
Posts: 5,573

Rep: Reputation: Disabled

found your link you read here

Successful su for nobody by root? post 8


Last edited by aus9; 09-07-2008 at 07:52 PM.


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
What would happen if I where to cat /dev/mem > /dev/null Joey.Dale Linux - General 11 07-26-2009 01:46 PM
Startx Permission problems on /dev/null and /dev/mem on freshly compiled Eric_Cartman Linux - Kernel 2 09-09-2007 02:42 AM
Diff Between /dev/zero & /dev/null rajaniyer123 Solaris / OpenSolaris 4 07-02-2007 07:09 AM
What is meant by " file > /dev/null 2>&1 </dev/null " attockonian Linux - Newbie 5 06-30-2006 11:51 PM
mv c:\WINDOWS /dev/null; mount /dev/hda treehead Member Intro 5 10-19-2004 09:53 AM > Forums > Linux Forums > Linux - Newbie

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

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration