Reader small image

You're reading from  Mastering Linux Security and Hardening - Third Edition

Product typeBook
Published inFeb 2023
Reading LevelIntermediate
PublisherPackt
ISBN-139781837630516
Edition3rd Edition
Languages
Tools
Right arrow
Author (1)
Donald A. Tevault
Donald A. Tevault
author image
Donald A. Tevault

Donald A. Tevault - but you can call him Donnie - got involved with Linux way back in 2006, and has been working with it ever since. He holds the Linux Professional Institute Level 3-Security certification, and the GIAC Incident Handler certification. Donnie is a professional Linux trainer, and thanks to the magic of the internet, teaches Linux classes literally the world over from the comfort of his living room. He's also a Linux security researcher for an IoT security company.
Read more about Donald A. Tevault

Right arrow

Setting different configurations for different users and groups

On the server side, you can use the Match User or Match Group directive to set up custom configurations for certain users or groups. To see how it’s done, look at the example at the very bottom of the /etc/ssh/sshd_config file. There, you’ll see the following:

# Match User anoncvs
# X11Forwarding no
# AllowTcpForwarding no
# PermitTTY no
# ForceCommand cvs server

Of course, this has no effect since it’s commented out, but that’s okay. Here’s what we see for user anoncvs:

  • He can’t do X11 forwarding.
  • He can’t do TCP forwarding.
  • He won’t have the use of a command terminal.

As soon as he logs in, he’ll be starting the Concurrent Versioning Service (CVS) server. By not having use of the terminal, anoncvs can start the CVS server, but can’t do anything else.

You can set up different configurations for as many users...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Mastering Linux Security and Hardening - Third Edition
Published in: Feb 2023Publisher: PacktISBN-13: 9781837630516

Author (1)

author image
Donald A. Tevault

Donald A. Tevault - but you can call him Donnie - got involved with Linux way back in 2006, and has been working with it ever since. He holds the Linux Professional Institute Level 3-Security certification, and the GIAC Incident Handler certification. Donnie is a professional Linux trainer, and thanks to the magic of the internet, teaches Linux classes literally the world over from the comfort of his living room. He's also a Linux security researcher for an IoT security company.
Read more about Donald A. Tevault