cancel
Showing results for 
Search instead for 
Did you mean: 

nologin

Ashok S T
Advisor

nologin

How can i block particular user for nologin and that user want ftp access?


I have tried in the way,

1.create /etc/nologin file and enter that user name.
2.In /etc/default/security file variable NOLOGIN=1
I followed this steps but all users are not able to login ,ftp access is there.
Is there any other method please let me know

thanks in advance,
regards ,
Ashok
3 REPLIES
Tim Nelson
Honored Contributor

Re: nologin

Typically if you are looking for ftp only access you use the shell of /usr/bin/false in /etc/passwd for that user and edit /etc/shells to include /usr/bin/false.

e.g.

ftpuser:DAH9WENA43:900:900:ftp only:/home/ftpuser:/usr/bin/false

John Guster
Trusted Contributor

Re: nologin

update the /etc/passwd file to set the login shell to /usr/bin/false for that login ID. Remember to add /usr/bin/false to /etc/shells so ftp ID will still work.
Ashok S T
Advisor

Re: nologin

Thanks guys ,

I Got it.