Results 1 to 9 of 9

Thread: I would like to know how to apply security to Ubuntu.

  1. #1
    Join Date
    Dec 2023
    Beans
    3

    Question I would like to know how to apply security to Ubuntu.

    I would like to know how to apply security to Ubuntu. Is the command below correct to apply the security patch?


    apt update && apt install '~U ~Asecurity'

  2. #2
    Join Date
    Jul 2013
    Location
    Wisconsin
    Beans
    4,952

    Re: I would like to know how to apply security to Ubuntu.

    That command will update your local database of available deb packages, then produce an error message.
    Producing an error message seems unlikely to be your intended goal.

    A stock install of Ubuntu will, if connected to the internet, install most security patches completely automatically at least twice daily. You don't need to trigger the action. You don't need to do anything. "automatically" means just that.

    Some security patches are not automatic for various reasons.

    You can review all automatic upgrades, including security patch upgrades, in your apt log: /var/log/apt/history.log
    Last edited by ian-weisser; December 28th, 2023 at 11:49 AM.

  3. #3
    Join Date
    Mar 2010
    Location
    USA
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: I would like to know how to apply security to Ubuntu.

    Quote Originally Posted by rnakama View Post
    I would like to know how to apply security to Ubuntu. Is the command below correct to apply the security patch?
    Code:
    apt update && apt install '~U ~Asecurity'
    As Holger explained, no.

    What I'm curious about, is what do you mean by "apply security"?

    Do you mean apply a CVE Security Vulnerabilty Patch? For those, most are automatic, though some need certain things done. I usually look at the CVE notices.

    Do you mean doing a security audit to harden a system for commercial or Govt CIS/STIG compliance? That would be the CIS?STIG audit or installing 'Lynis' to do a lower level security compliance audit.

    I'm thinking maybe not... But thought to ask, for the just-in-cases.

    "Concurrent coexistence of Windows, Linux and UNIX..." || Ubuntu user # 33563, Linux user # 533637
    Sticky: Graphics Resolution | UbuntuForums 'system-info' Script | Posting Guidelines | Code Tags

  4. #4
    Join Date
    Apr 2011
    Location
    Mystletainn Kick!
    Beans
    13,615
    Distro
    Ubuntu

    Re: I would like to know how to apply security to Ubuntu.

    moved to security
    Splat Double Splat Triple Splat
    Earn Your Keep
    Don't mind me, I'm only passing through.
    Once in a blue moon, I'm actually helpful
    .

  5. #5
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: I would like to know how to apply security to Ubuntu.

    If all you want is security patches, you get those automatically by doing normal patching via any APT interface provided the system and repos involved are currently supported. On install, there are usually a few specific packages that aren't supported.

    If you install using PPAs or Snaps or flatpaks or AppImages or manually with .deb, or install files, then all bets are off. You've accepted this responsibility. Stay with the core repos only, don't use any funny extra installations, stay on LTS releases for 3 yrs (or 5yrs if Servers), and you'll get all the security patches.

    As for security configuration, that's up to you. There's no magic to make that happen, since many of those more secure, restrictive, settings, break things normal users expect to "just work".

    As other have said, stay patched and if you want more security, then find the guide(s) appropriate to the level of security you seek. I think the 22.04 versions of those security guides aren't published yet. The 20.04 version are, but probably only for 2 yr old releases, so you'll need to use your judgement and skill to decide which specific items impact the system you have.

    https://github.com/lfit/itpol is the Linux Foundation's Workstation Security Guide, for example.
    STIGs for Ubuntu 22.04 aren't ready, but here are where they will be placed and other guides: https://ubuntu.com/security/certifications/docs/2204

  6. #6
    Join Date
    Dec 2023
    Beans
    3

    Re: I would like to know how to apply security to Ubuntu.

    Thank you everyone for your replies. I am very grateful.
    And I'm sorry for the insufficient explanation.

    For example, I don't know the command to implement a security patch on Ubuntu that is equivalent to the Red Hat Enterprise Linux command below, so I would like to know.


    yum -y update --security

  7. #7
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: I would like to know how to apply security to Ubuntu.

    According to the manpage, apt-get doesn't have an equivalent command. You would need to get a list of updates, determine if they are security related, then choose to install each, hoping the dependencies don't change if you don't include other package updates.

    Google found this answer: https://askubuntu.com/questions/194/...e-command-line
    Code:
    apt-get -s dist-upgrade | grep "^Inst" | \
        grep -i securi | awk -F " " {'print $2'} | \
        xargs apt-get install
    I've never used it, so YMMV. I'd probably use a 1-line perl command rather than 2 greps and an awk myself, but have at it.

    Why are they different than that other distro's command? APT and RPM are different with different audiences/users.

  8. #8
    Join Date
    Nov 2008
    Location
    Boston MetroWest
    Beans
    16,326

    Re: I would like to know how to apply security to Ubuntu.

    Why not just upgrade everything? Why limit yourself to security upgrades?
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  9. #9
    Join Date
    Jun 2007
    Location
    Arizona U.S.A.
    Beans
    5,739

    Re: I would like to know how to apply security to Ubuntu.

    If you want to see exactly which updates are security updates, use Software Updater which segregates the updates as "Security Updates" or "Other Updates". See Screenshot. It handles them all.
    Attached Images Attached Images

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •