Tags » Sudo

Simple Server

The server was created using a rather old PC running GNU/Linux Debian.

1. Conventions

Whenever you see the ~ symbol used, as in ~/.xsession, this indicates the file resides within the users home directory. 1,657 more words


FreeBSD Network Management with network.sh Script

When You use only one connection on FreeBSD, then the best practice is to just put its whole configuration into the /etc/rc.conf file, for example typical server redundant connection would look like that one below. 1,243 more words

How to Add New User in Ubuntu and Grant it Sudo Privileges

Adding New User

Add new user with the following command

sudo adduser newuser

after that ubuntu will ask you for your new user’s password and other information… 167 more words


How to make your sudo session last longer (Artix, Obarun, and others)

This is generally an Arch safety default for sudo to expire after 5′, while other distributions allow it to be in effect longer/.

The modification you can make can be in /etc/sudoers by adding a line as: 151 more words


Provide password for running a script inside another script as different user

Imagine you run script as user A: sudo -u A ./script.sh
Inside that script.sh we have a line that calls another script script2.sh with a different user B: … 163 more words


sudo: sorry, you must have a tty to run sudo

Replace Defaults requiretty by Defaults !requiretty in your /etc/sudoers. This will impact your global sudo configuration.

How to fix 'sudo: no tty present and no askpass program specified' error?

  1. Use NOPASSWD line for all commands, I mean:
    jenkins ALL=(ALL) NOPASSWD: ALL
  2. Put the line after all other lines in the sudoers file.