Linux Classroom Series – 27/Jul/2020

Sticky bit

  • Sticky is a special permission that cna be used to prevent users from deleting other users files and directories
  • Root user can ofcourse delete this, but not others users
  • Adding stick bit to use +t in chmod Preview
  • If we add chmod +t to files/directories others users cannot delete it, but if the other user is sudoer or super user they can delete Preview

visudo

  • visudo is a command that helps in editing sudoers file.
  • since its not a good idea to change /etc/sudoers file directly, visudo command can help in editing sudoers file
  • visudo edits the sudoers file, which defines the users and groups with administrative rights
  • Now execute the command visudo from root user Preview
  • any line which starts with # is comment
  • In this file root ALL=(ALL:ALL) ALL states that the user root, may run as any user or group , any command
  • Syntax of directive
user hostname=(runas-user:runas-group) command
  • If the user in the directive begins with %, it is group
%admin ALL=(ALL) ALL
%sudo   ALL=(ALL:ALL) ALL
%wheel  ALL=(ALL)       ALL
  • For sudo users when execute sudo password/key is expected, to ensure linux doesn’t ask passwords when we use sudo command
%sudo   ALL=(ALL:ALL) NOPASSWD:ALL
%wheel  ALL=(ALL)     NOPASSWD:ALL

Managing Softwares in Linux

  • A good chunk of time as sys admin/devops will be spent in managing the various softwares/applications.
  • When we install any software, we would be running them. In this running/executing there are two kinds of softwares
    1. Software which executes only when the user executes the command
    2. Software which run all the time in background. In linux any program that runs in the background is called as daemon.

Approaches of installing software in linux

  1. From source code:

    • Copy the source code in linux
    • compile the source code (make tools)
    • copy the executables into the folders of your choice
    • Add folders to PATH variables (if required)
    • Example: Look into nagios installation Refer Here
  2. From executables:

    • Software executables will be shared to you as tar/zip files
    • untar the files, copy them to folders of your choice and execute applications
  3. Package Managers:

    • will be discussed in next class

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

About learningthoughtsadmin