Shell Accounts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,
The way I do this is as follows. First, add the following to the end
of your /etc/shells file.

/bin/nologin

This way, your ftp server will consider /bin/nologin a valid shell.
Now, create /bin/nologin as follows:

#!/usr/bin/tail +2
Sorry, but logins for this account are disabled.
It is being used only to provide a service.

Now make this executable with this command:

chmod 755 /bin/nologin

Finally, set the shell of the account you want to block logins for to
/bin/nologin.

There are other ways to do this, but I like this one because it
provides an explanatory message to those trying to log in. Anyone
attempting to login to the account will receive the following
message:

Sorry, but logins for this account are disabled.
It is being used only to provide a service.

Once the message is printed, the connection will be promptly
terminated.
- ---
Joseph C. Lininger
jbahm at pcdesk.net
- ----- Original Message ----- 
From: "Rejean Proulx" <rejean@xxxxxxxxxxxx>
To: <speakup at braille.uwo.ca>
Sent: Wednesday, December 03, 2003 4:54 AM
Subject: Shell Accounts


> I have an account that I want to use for ftp only and I don't want
> people logging in to.  How to I stop them?
> 
>  Rejean Proulx
> Visit my family at http://interfree.ca
> MSN is: rejp at rogers.com
> Ham License VA3REJ
> 
> 
> _______________________________________________
> Speakup mailing list
> Speakup at braille.uwo.ca
> http://speech.braille.uwo.ca/mailman/listinfo/speakup

-----BEGIN PGP SIGNATURE-----
Version: PGP 8.0.3

iQA/AwUBP86pNyenap9Jqj2wEQIJ6wCaAr0XXT4C25od2hMgbTF/ah13+4AAn018
jn+LkFTDM44J5JmfCsjqa9XJ
=1NGL
-----END PGP SIGNATURE-----





[Index of Archives]     [Linux for the Blind]     [Fedora Discussioin]     [Linux Kernel]     [Yosemite News]     [Big List of Linux Books]
  Powered by Linux