Random Wisdom

Tag: restrict access

Restricting access to SFTP / SCP

by on Oct.18, 2009, under How To ..., Linux, Software

rssh is a tool that allows SFTP/SCP for file transfers over SSH but denies shell access — useful for preventing users from running commands on the system. More details are available on the tool’s homepage.

I first came across it on this page.

Leave a Comment :, , , , , more...

Linux – Disable Shutdown For Normal Users

by on Feb.27, 2007, under How To ..., Linux

Very useful for servers/shared machines:

Disable Shutdown For Normal Users

Addendum:

Setting file mode for /etc/acpi/events/power.conf to “0000” is not sufficient to disable the power button. It’s better to:

  1. Uninstall gnome-power-manager
  2. Leave file permissions for power.conf unchanged and simply set the action= line to an empty string

It is also advisable to set the local login screen style to plain in gdmsetup.

Leave a Comment :, , more...

HTTP Access Control

by on Jan.25, 2006, under How To ..., Software

Finally figured out how to password protect individual directories on the server:

Authentication, Authorization and Access Control

It’s a simple 2-step process:

1. Create a passwords file for the users using “htpasswd“:

jsmith@server:~/public_html/db$ htpasswd -c ~/htpasswds jdoe
New password:
Re-type new password:
Adding password for user jdoe
jsmith@server:~/public_html/db$

2. Create a file “.htaccess” in the directory to be protected:

jsmith@server:~/public_html/db$ cat .htaccess
AuthType Basic
AuthName "db"
AuthUserFile /home/jsmith/htpasswds
Require user jdoe
2 Comments :, , , , more...