adduser but no shell and no home dir
I would like to setup a user strictly for FTP, so I do not want them to have access to a shell nor do I want them to have a home dir. I know the GUI in RH9 allowed me to do this but how can I from a CLI (command line) in Mandrake9.2?
And yes, I did RTFM. :) thanks. The GNUbie |
Try this something like this..
useradd -g ftpusers -d /dev/null fred |
well
looks like its still letting me ssh in...
Could not chdir to home directory /dev/null: Not a directory -bash: /dev/null/.bash_profile: Not a directory -bash-2.05b$ :( any other suggestions? |
for the next guy
|
set the login shell to /bin/false
|
I had the same problem...still haven't resolved it. Even WITH all the correct options for useradd it just adds the user, no home directory or anything.
|
How can i create any user without making directory in home??? any one can suggest me??
|
Saminur.. I recently used the command
root@testsvr:~# useradd -g testgroup -d /dev/null -s /dev/null testuser2 to create a user "testuser2" in the group "testgroup" with no shell access or home directory. Technically the command assigns /dev/null to be the home dir. It also assigns the shell as /dev/null. There are lots of posts around saying to use /bin/noshell as the shell but I feel happier using /dev/null and its always worked fine for me. (/dev/null is can be thought of as a blackhole in linux, anything sent to it vanishes!) To allow this account to be used for anything, ftp etc you will need to give the user a password by issuing the command root@testsvr:~# passwd testuser2 then entering and confirming the password. Hope this helps, this works on Ubuntu but should work on most if not all distros as far as im aware. |
All times are GMT -5. The time now is 11:29 AM. |