Skip to content
David Kittell
David Kittell

Application & System: Development / Integration / Orchestration

  • Services
    • Application Development
    • Online Application Integration
  • Code
  • Online Tools
  • Tech Support
David Kittell

Application & System: Development / Integration / Orchestration

UNIX – Create Sudoers Access

Posted on August 5, 2016August 5, 2016 By David Kittell
# Variables - Start
username="dkittell"
# Variables - Stop

su
# type in sudo password
chmod -v +w /etc/sudoers && echo -e "$username ALL=(ALL) ALL" >> /etc/sudoers && chmod -v -w /etc/sudoers

# Variables - Start
username="dkittell"
# Variables - Stop

su
# type in sudo password
# Remove Sudoers access
chmod -v +w /etc/sudoers && sed -i "/^$username/d" /etc/sudoers && chmod -v -w /etc/sudoers
All information on this site is shared with the intention to help. Before any source code or program is ran on a production (non-development) system it is suggested you test it and fully understand what it is doing not just what it appears it is doing. I accept no responsibility for any damage you may do with this code.

Related

CentOS Code Fedora Red Hat UNIX UNIX Shell Scripts

Post navigation

Previous post
Next post

Related Posts

Find Library Item Links In Content

Posted on May 31, 2014October 26, 2015

SELECT c.[content_id] ,c.[content_title] ,c.[folder_id] ,cft.[folder_name] ,cft.FolderPath ,cft.FolderIdPath FROM [content] c INNER JOIN [content_folder_tbl] cft ON c.folder_id = cft.folder_id WHERE content_html LIKE ‘%uploadedFiles%’ Originally Posted on May 31, 2014Last Updated on October 26, 2015 All information on this site is shared with the intention to help. Before any source code or…

Read More

Red Hat / CentOS / Fedora – Install/Configure Cerbot

Posted on January 6, 2017

This is a work in progress…. # Install/Configure Apache – Start # Install Apache sudo yum -y install httpd # Install SSL sudo yum -y install mod_ssl openssl # Start and Enable Apache sudo systemctl start httpd.service sudo systemctl enable httpd.service # Open Firewall for HTTP and HTTPS sudo firewall-cmd…

Read More

Show Stored Procedures

Posted on July 30, 2013October 26, 2015

SELECT so.NAME ,created ,last_altered ,specific_catalog ,routine_definition ,sql_data_access FROM sys.objects so LEFT OUTER JOIN information_schema.routines sr ON so.NAME = sr.specific_name WHERE objectproperty(object_id, N’IsMSShipped’) = 0 AND objectproperty(object_id, N’IsProcedure’) = 1 ORDER BY created DESC ,NAME SELECT * FROM information_schema.routines WHERE routine_type = ‘PROCEDURE’ ORDER BY specific_name SELECT * FROM sys.objects WHERE…

Read More

Code

Top Posts & Pages

  • PowerShell - Rename Pictures to Image Taken
  • Front Page
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions

Recent Posts

  • Javascript – Digital Clock with Style
  • BASH – Web Ping Log
  • BASH – Picture / Video File Name Manipulation
  • Mac OSX Terminal – Create SSH Key
  • Bash – Rename Picture

Top Posts

  • PowerShell - Rename Pictures to Image Taken
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions
©2025 David Kittell | WordPress Theme by SuperbThemes