To fix the recent 0x0000011b printing errors without removing the current Windows Updates (KB5005565), you can instead disable the CVE-2021-1678 mitigation enabled by default this month.
To do that, open the Windows Registry Editor and navigate to the HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Print key, create a new DWORD-32 bit value named RpcAuthnLevelPrivacyEnabled, and set it to 0 and restart the PC.
We can auto logout inactive user sessions after certain time in three ways. Let us see the first method.
Method 1:
Edit ~/.bashrc or ~/.bash_profile file:
$ nano ~/.bashrc
Or,
$ nano ~/.bash_profile
Add the following line at the end:
TMOUT=100
Configure user time out value in Linux
This makes the user to logout automatically after an inactivity of 100 seconds. You can define this value as per your convenient. Press ESC and type :wq to save the file and close it.
Apply the changes by running the following command:
$ source ~/.bashrc
Or,
$ source ~/.bash_profile
Now, leave the session idle for 100 seconds. After an inactivity of 100 seconds, you will see the following message and the user will be automatically logged out from the session.
timed out waiting for input: auto-logout
Connection to 192.168.122.181 closed.
Auto logout inactive users in Linux
This setting can be easily modified by the user. Because, ~/.bashrc file is owned by the user himself.
To modify or delete the timeout settings, simply delete the lines added above and apply the changes by running the following command:
$ source ~/.bashrc
Alternatively, the user can disable this by running the following commands:
$ export TMOUT=0
Or,
$ unset TMOUT
Since the timeout setting is stored in the user-owned ~/.bashrc file, s/he can easily bypass it by simply deleting the line. If you want to prevent the user from changing the settings, follow second method.
Using nohup allows you to run a command in the background and keep it running. How? nohup bypasses the HUP signal (signal hang up), making it possible to run commands in the background even when the terminal is off. Combine this command with redirection to “/dev/null” (to prevent nohup from making a nohup.out file), and everything goes to the background with one command.
nohup COMMAND &>/dev/null &
If instead of closing the terminal you type disown the terminal windows will not include in its jobs the command you wrote above and therefore even when you close it, the command will still run.
and it will show you all the locations for the various profile files depending on functions such as Remote Hosts, CurrentHosts etc.
A sample file will look like this:
##Go to Path
Function myFolder {Set-Location -Path "C:\Myfolder\"}
Function dev {Set-Location -Path "C:\DevFolder\"}
#Get version
Function Get-Version {$PSVersionTable.PSVersion}
#Alias Command
Function Pro {notepad $PROFILE.AllUsersCurrentHost}
#Alias to EXE
Set-Alias -Name mp -Value D:\Software\MyProgram.exe
Set-Alias -Name c -Value cls
#Customize prompt
Function Prompt
{
$env:COMPUTERNAME + "\" + (Get-Location) + "> "
}
Apache CouchDB is a free and open-source NoSQL database developed by the Apache Software Foundation. It can be used as a single-node or clustered database.
CouchDB server stores its data in named databases, which contains documents with JSON structure. Each document consists of a number of fields and attachments. Fields can include text, numbers, lists, booleans, more. CouchDB includes a RESTful HTTP API that allows you to read, create, edit, and delete database documents.
This article covers the steps of installing the latest version of CouchDB on Ubuntu 20.04.
Installing CouchDB on Ubuntu is relatively straightforward. We’ll enable the CouchDB APT repository, import the repository GPG key, and install the CouchDB package.
Enabling CouchDB repository
Run the following commands as root or user with sudo privileges to enable the CouchDB repository and import GPG key:
curl -L https://couchdb.apache.org/repo/bintray-pubkey.asc | sudo apt-key add -echo "deb https://apache.bintray.com/couchdb-deb focal main" | sudo tee -a /etc/apt/sources.list
Installing CouchDB on Ubuntu
Once the repository is enabled, update the packages list and install CouchDB:
sudo apt updatesudo apt install couchdb
The installer will ask you whether you want to install CouchDB in a clustered or standalone mode. A cluster means multiple servers connected together, working as a single, distributed data store.
We will install CouchDB in a single-server standalone mode.
Next, you’ll be given an option to set the IP address of the network interface on which the CouchDB will bind to. For a single-server setup, leave the default 127.0.0.1. If you are configuring a cluster, enter the interface IP address or type 0.0.0.0, which tells CouchDB to binds to all network interfaces.
On the next prompt, set the admin password. It is highly recommended to set the password, which will take CouchDB out of the insecure “admin party” mode. If you leave this field blank, an admin user will not be created.
Finally, confirm the password, and the CouchDB installation will continue.
Verifying CouchDB Installation
The CouchDB server is running at localhost:5984. To verify whether the installation was successful and the service is running, run the following curl command that will print information about the CouchDB database in JSON format:
in Centos do also the following to setup the password for the above user:
passwd iordanis
Now, to add him to the sudo users group :
Ubuntu
usermod -aG sudo
In Centos :
usermod –aG wheel iordanis
If you want to add a user in the sudoers group then: (The below text is taken from www.linuxize.com
The users’ and groups’ sudo privileges are defined in the /etc/sudoers file. Adding the user to this file allows you to grant customized access to the commands and configure custom security policies.
You can configure the user sudo access by modifying the sudoers file or by creating a new configuration file in the /etc/sudoers.d directory. The files inside this directory are included in the sudoers file.
Always use visudo to edit the /etc/sudoers file. This command checks the file for syntax errors when you save it. If there are any errors, the file is not saved. If you open the file with a text editor, a syntax error may result in losing the sudo access.
Typically, visudo uses vim to open the /etc/sudoers. If you don’t have experience with vim and you want to edit the file with nano , change the default editor by running:
EDITOR=nano visudo
Let’s say you want to allow the user to run sudo commands without being asked for a password. To do that, open the /etc/sudoers file:
visudo
Scroll down to the end of the file and add the following line: /etc/sudoers
username ALL=(ALL) NOPASSWD:ALL
Save a file and quit the editor . Do not forget to change “username” with the username you want to grant access to.
Another typical example is to allow the user to run only specific commands via sudo . For example, to allow only the mkdir and rmdir commands, you would use: /etc/sudoers
username ALL=(ALL) NOPASSWD:/bin/mkdir,/bin/rmdir
Instead of editing the sudoers file, you can accomplish the same by creating a new file with the authorization rules in the /etc/sudoers.d directory. Add the same rule as you would add to the sudoers file:
echo "username ALL=(ALL) NOPASSWD:ALL" | sudo tee /etc/sudoers.d/username
This approach makes the management of the sudo privileges more maintainable. The name of the file not important. It is a common practice the name of the file to be the same as the username.
To allow SSH access for a particular user, for example sk, edit sshd_config file:
$ sudo vi /etc/ssh/sshd_config
Press “i” to enter into insert mode and add or modify the following line:
AllowUsers sk
Edit ssh configuration file to allow ssh access to particular user
Replace “sk” with your username. Please mind the space indentation between “AllowUsers” and “sk”. You should use Tab instead of Space-bar. Meaning – add the word “AllowUsers” and hit the Tab key and then specify the username.
You can also specify more than one user as shown below.
AllowUsers user1 user2
To allow an entire group, say for example root, add/edit the following line:
AllowGroups root
This setting will allow all the members of the “root” group to ssh to the Linux server.
Press ESC key to exit insert mode and type :wq to save and quit the SSH config file. Restart SSH service to take effect the changes.