LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 07-17-2008, 04:14 PM   #1
techemically
Member
 
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
nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
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, 06:42 PM   #2
stress_junkie
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, 06:46 PM   #3
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
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, 06:40 AM   #4
FranDango
Member
 
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 05:10 AM.
 
Old 07-18-2008, 03:59 PM   #5
Wekker
LQ Newbie
 
Registered: Jul 2008
Posts: 4

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

Quote:
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, 10:00 AM   #6
techemically
Member
 
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]

Options:
-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, 12:08 PM   #7
jomen
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
or
chsh --shell/dev/null nobody
 
Old 07-20-2008, 04:39 PM   #8
techemically
Member
 
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, 10:56 PM   #9
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
EDIT

found your link you read here

Successful su for nobody by root? post 8

http://www.linuxquestions.org/questi...05#post2555505

cheerio

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


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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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