Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

how do i duplicate the nobody user?

i have a couple of webprojects and need to chown the diffrent projects to diffrent users with absolutly no privileges

i currently use nobody on a project. works fine

share|improve this question

1 Answer 1

up vote 6 down vote accepted

I would suggest adding the users manually in /etc/passwd. Take a look at the nobody-line, it should be something like

nobody:x:65534:65534:nobody:/nonexistent:/bin/sh

Add another line, change the ID and you should be good to go.

nobody2:x:65533:65533:nobody2:/nonexistent:/bin/sh

Or if you would like to use a command, this should do it:

useradd nobody2 -d /nonexistent -s /bin/sh
share|improve this answer
6  
Though this will work, I generally suggest you avoid manually editing that file. Use the tools like useradd. If you want to manually edit, consider at least using vipw, which is a tool that will check that your changes are valid. –  Zoredache Feb 26 '11 at 0:05
    
I can understand your point off view, you are right, if you screw the file, you're a long way from home... Added the command ;-) –  Bart De Vos Feb 26 '11 at 0:43
3  
I would further suggest NOT using "nobody" usernames -- there's an old joke that "nobody" is the second most privileged user on a system, after root. Give the users a meaningful username and GECOS fullname to distinguish them from each other. –  voretaq7 Feb 26 '11 at 0:51
    
Also true, You might even want to change the shell to /sbin/nologin. Like that he will be unable to login. –  Bart De Vos Feb 26 '11 at 12:06

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.