Create Sudo User on Ubuntu 20.04 LTS Linux Server

How do I create a new user with sudo access on Ubuntu 20.04 LTS Linux server? Can you tell me command to add sudo user on Ubuntu 20.04 Linux server?

The sudo command allows us to run any or selected command as another user as specified by the security policy by the system administrator. This page explains how to create a sudo user on Ubuntu 20.04 LTS server.

#ubuntu #ubuntu-linux

What is GEEK

Buddha Community

Create Sudo User on Ubuntu 20.04 LTS Linux Server
Easter  Deckow

Easter Deckow

1655630160

PyTumblr: A Python Tumblr API v2 Client

PyTumblr

Installation

Install via pip:

$ pip install pytumblr

Install from source:

$ git clone https://github.com/tumblr/pytumblr.git
$ cd pytumblr
$ python setup.py install

Usage

Create a client

A pytumblr.TumblrRestClient is the object you'll make all of your calls to the Tumblr API through. Creating one is this easy:

client = pytumblr.TumblrRestClient(
    '<consumer_key>',
    '<consumer_secret>',
    '<oauth_token>',
    '<oauth_secret>',
)

client.info() # Grabs the current user information

Two easy ways to get your credentials to are:

  1. The built-in interactive_console.py tool (if you already have a consumer key & secret)
  2. The Tumblr API console at https://api.tumblr.com/console
  3. Get sample login code at https://api.tumblr.com/console/calls/user/info

Supported Methods

User Methods

client.info() # get information about the authenticating user
client.dashboard() # get the dashboard for the authenticating user
client.likes() # get the likes for the authenticating user
client.following() # get the blogs followed by the authenticating user

client.follow('codingjester.tumblr.com') # follow a blog
client.unfollow('codingjester.tumblr.com') # unfollow a blog

client.like(id, reblogkey) # like a post
client.unlike(id, reblogkey) # unlike a post

Blog Methods

client.blog_info(blogName) # get information about a blog
client.posts(blogName, **params) # get posts for a blog
client.avatar(blogName) # get the avatar for a blog
client.blog_likes(blogName) # get the likes on a blog
client.followers(blogName) # get the followers of a blog
client.blog_following(blogName) # get the publicly exposed blogs that [blogName] follows
client.queue(blogName) # get the queue for a given blog
client.submission(blogName) # get the submissions for a given blog

Post Methods

Creating posts

PyTumblr lets you create all of the various types that Tumblr supports. When using these types there are a few defaults that are able to be used with any post type.

The default supported types are described below.

  • state - a string, the state of the post. Supported types are published, draft, queue, private
  • tags - a list, a list of strings that you want tagged on the post. eg: ["testing", "magic", "1"]
  • tweet - a string, the string of the customized tweet you want. eg: "Man I love my mega awesome post!"
  • date - a string, the customized GMT that you want
  • format - a string, the format that your post is in. Support types are html or markdown
  • slug - a string, the slug for the url of the post you want

We'll show examples throughout of these default examples while showcasing all the specific post types.

Creating a photo post

Creating a photo post supports a bunch of different options plus the described default options * caption - a string, the user supplied caption * link - a string, the "click-through" url for the photo * source - a string, the url for the photo you want to use (use this or the data parameter) * data - a list or string, a list of filepaths or a single file path for multipart file upload

#Creates a photo post using a source URL
client.create_photo(blogName, state="published", tags=["testing", "ok"],
                    source="https://68.media.tumblr.com/b965fbb2e501610a29d80ffb6fb3e1ad/tumblr_n55vdeTse11rn1906o1_500.jpg")

#Creates a photo post using a local filepath
client.create_photo(blogName, state="queue", tags=["testing", "ok"],
                    tweet="Woah this is an incredible sweet post [URL]",
                    data="/Users/johnb/path/to/my/image.jpg")

#Creates a photoset post using several local filepaths
client.create_photo(blogName, state="draft", tags=["jb is cool"], format="markdown",
                    data=["/Users/johnb/path/to/my/image.jpg", "/Users/johnb/Pictures/kittens.jpg"],
                    caption="## Mega sweet kittens")

Creating a text post

Creating a text post supports the same options as default and just a two other parameters * title - a string, the optional title for the post. Supports markdown or html * body - a string, the body of the of the post. Supports markdown or html

#Creating a text post
client.create_text(blogName, state="published", slug="testing-text-posts", title="Testing", body="testing1 2 3 4")

Creating a quote post

Creating a quote post supports the same options as default and two other parameter * quote - a string, the full text of the qote. Supports markdown or html * source - a string, the cited source. HTML supported

#Creating a quote post
client.create_quote(blogName, state="queue", quote="I am the Walrus", source="Ringo")

Creating a link post

  • title - a string, the title of post that you want. Supports HTML entities.
  • url - a string, the url that you want to create a link post for.
  • description - a string, the desciption of the link that you have
#Create a link post
client.create_link(blogName, title="I like to search things, you should too.", url="https://duckduckgo.com",
                   description="Search is pretty cool when a duck does it.")

Creating a chat post

Creating a chat post supports the same options as default and two other parameters * title - a string, the title of the chat post * conversation - a string, the text of the conversation/chat, with diablog labels (no html)

#Create a chat post
chat = """John: Testing can be fun!
Renee: Testing is tedious and so are you.
John: Aw.
"""
client.create_chat(blogName, title="Renee just doesn't understand.", conversation=chat, tags=["renee", "testing"])

Creating an audio post

Creating an audio post allows for all default options and a has 3 other parameters. The only thing to keep in mind while dealing with audio posts is to make sure that you use the external_url parameter or data. You cannot use both at the same time. * caption - a string, the caption for your post * external_url - a string, the url of the site that hosts the audio file * data - a string, the filepath of the audio file you want to upload to Tumblr

#Creating an audio file
client.create_audio(blogName, caption="Rock out.", data="/Users/johnb/Music/my/new/sweet/album.mp3")

#lets use soundcloud!
client.create_audio(blogName, caption="Mega rock out.", external_url="https://soundcloud.com/skrillex/sets/recess")

Creating a video post

Creating a video post allows for all default options and has three other options. Like the other post types, it has some restrictions. You cannot use the embed and data parameters at the same time. * caption - a string, the caption for your post * embed - a string, the HTML embed code for the video * data - a string, the path of the file you want to upload

#Creating an upload from YouTube
client.create_video(blogName, caption="Jon Snow. Mega ridiculous sword.",
                    embed="http://www.youtube.com/watch?v=40pUYLacrj4")

#Creating a video post from local file
client.create_video(blogName, caption="testing", data="/Users/johnb/testing/ok/blah.mov")

Editing a post

Updating a post requires you knowing what type a post you're updating. You'll be able to supply to the post any of the options given above for updates.

client.edit_post(blogName, id=post_id, type="text", title="Updated")
client.edit_post(blogName, id=post_id, type="photo", data="/Users/johnb/mega/awesome.jpg")

Reblogging a Post

Reblogging a post just requires knowing the post id and the reblog key, which is supplied in the JSON of any post object.

client.reblog(blogName, id=125356, reblog_key="reblog_key")

Deleting a post

Deleting just requires that you own the post and have the post id

client.delete_post(blogName, 123456) # Deletes your post :(

A note on tags: When passing tags, as params, please pass them as a list (not a comma-separated string):

client.create_text(blogName, tags=['hello', 'world'], ...)

Getting notes for a post

In order to get the notes for a post, you need to have the post id and the blog that it is on.

data = client.notes(blogName, id='123456')

The results include a timestamp you can use to make future calls.

data = client.notes(blogName, id='123456', before_timestamp=data["_links"]["next"]["query_params"]["before_timestamp"])

Tagged Methods

# get posts with a given tag
client.tagged(tag, **params)

Using the interactive console

This client comes with a nice interactive console to run you through the OAuth process, grab your tokens (and store them for future use).

You'll need pyyaml installed to run it, but then it's just:

$ python interactive-console.py

and away you go! Tokens are stored in ~/.tumblr and are also shared by other Tumblr API clients like the Ruby client.

Running tests

The tests (and coverage reports) are run with nose, like this:

python setup.py test

Author: tumblr
Source Code: https://github.com/tumblr/pytumblr
License: Apache-2.0 license

#python #api 

Roslyn  Conn

Roslyn Conn

1598012940

Install Zoom Client On Ubuntu 20.04/18.04 & Linux Mint 20/19

Zoom Client is a videoconferencing software developed by Zoom Video communications. It provides a video call, chat, and remote desktop sharing services for free accounts with time and participant limitations. Users having paid subscriptions can host a meeting with up to 1000 people with no time restriction.

Zoom has seen a major boost in the increase in usage due to the COVID-19 pandemic due to remote work and distance education.

The client is available for Windows, macOS, Linux desktop operating systems. Also, it is available for Android and iOS.

Here, we will see how to install Zoom Client on Ubuntu 20.04/18.04 & Linux Mint 20/19.

#post #ubuntu #zoom #ubuntu 20.04/18.04 #linux mint 20/19 #linux

How to Install Jellyfin Media Server on Ubuntu 20.04 LTS Server/Desktop

This tutorial will be showing you how to install Jellyfin media server on Ubuntu 20.04 LTS server/desktop. Jellyfin is a free, open-source application that allows you to organize your movies, TV shows, music and photos in one beautiful interface and stream those media files on your PC, tablet, phone, TV, Roku, etc on the network or over the Internet. Jellyfin can be installed on Linux, MacOS and Windows.

Jellyfin Features

Jellyfin is a fork from the Emby media server. It packs a lot of the same features as Plex and Emby.

  • Unlike Plex or Emby, Jellyfin is 100% free and open-source. No ads. No playback limit on mobile apps. (Though the iOS app can’t play videos in the background.)
  • Watch Live TV and set automatic recordings to expand your library.
  • Automatically fetch artwork, metadata from TheTVDB, TheMovieDB, The OpenMovie Database and Rotten Tomatoes.
  • Supports DLNA.
  • Optional plugins can be installed to provide additional features.
  • Supports hardware acceleration of video encoding/decoding using FFMpeg.
  • And more.

Install Jellyfin Media Server on Ubuntu 20.04

Jellyfin isn’t included in the default Ubuntu repository, but it has its own repository. Run the following command to add Jellyfin repository to your Ubuntu system.

echo "deb [arch=$( dpkg --print-architecture )] https://repo.jellyfin.org/ubuntu focal main" | sudo tee /etc/apt/sources.list.d/jellyfin.list

Next, run the following command to import the Jeffyfin GPG key to Ubuntu system so that APT can verify package integrity during installation.

wget -O - https://repo.jellyfin.org/jellyfin_team.gpg.key | sudo apt-key add -

And because this repository uses HTTPS connection, we also need to install apt-transport-https and ca-certificates package.

sudo apt install apt-transport-https ca-certificates

Finally, update the package index on your Ubuntu system and install Jellyfin.

sudo apt update

sudo apt install jellyfin

This command will also install 3 other packages as dependencies:

  • jellyfin-ffmpeg: for video transcoding.
  • jellyfin-server: the back end server.
  • jellyfin-web: the front end web interface.

Now Jellyfin media server is installed, we can check its status with:

systemctl status jellyfin

As you can see, it’s running on my Ubuntu 20.04 system. (Press q key to take back control of the terminal.)

If Jellyfin media server isn’t running, you can start it with:

sudo systemctl start jellyfin

#ubuntu #jellyfin #linux #media server #ubuntu desktop #ubuntu server

Chet  Lubowitz

Chet Lubowitz

1595429220

How to Install Microsoft Teams on Ubuntu 20.04

Microsoft Teams is a communication platform used for Chat, Calling, Meetings, and Collaboration. Generally, it is used by companies and individuals working on projects. However, Microsoft Teams is available for macOS, Windows, and Linux operating systems available now.

In this tutorial, we will show you how to install Microsoft Teams on Ubuntu 20.04 machine. By default, Microsoft Teams package is not available in the Ubuntu default repository. However we will show you 2 methods to install Teams by downloading the Debian package from their official website, or by adding the Microsoft repository.

Install Microsoft Teams on Ubuntu 20.04

1./ Install Microsoft Teams using Debian installer file

01- First, navigate to teams app downloads page and grab the Debian binary installer. You can simply obtain the URL and pull the binary using wget;

$ VERSION=1.3.00.5153
$ wget https://packages.microsoft.com/repos/ms-teams/pool/main/t/teams/teams_${VERSION}_amd64.deb

#linux #ubuntu #install microsoft teams on ubuntu #install teams ubuntu #microsoft teams #teams #teams download ubuntu #teams install ubuntu #ubuntu install microsoft teams #uninstall teams ubuntu

Maud  Rosenbaum

Maud Rosenbaum

1597304400

How to Install Apache Ant on Ubuntu 20.04 | 18.04

This brief tutorial shows students and new users how to install Apache Ant on Ubuntu 20.04 | 18.04.

Apache Ant is a Java library and tool that has number of built-in tasks allowing to compile, assemble, test and run Java applications. If you’re going to be developing Java apps, you may need Apache Ant to help automate the process.

For student or new user looking for a Linux system to learn on, the easiest place to start is Ubuntu Linux OS. It’s a great Linux operating system for beginners.

Ubuntu is an open source Linux operating systems that runs on desktops, laptops, server and other device.

While learning Ubuntu, you will find that Linux isn’t so different than Windows and other operating systems in so many ways, especially when it comes to using the system to get work done.

To get started with installing Apache Ant on Ubuntu, please follow the steps below:

Step 1: Install OpenJDK 8

Apache Ant is a Java based app so you’ll need Java installed. First, download the Java 8 Development Kit: either the official Oracle JDK or Open JDK

For this tutorial, we’re going to be install OpenJDK.

To do that, run the commands below:

sudo apt update
sudo apt-get install openjdk-8-jdk openjdk-8-doc openjdk-8-jre-lib

After installing Java, you can verify it by running the commands below:

**java -version**

It should output something similar as shown below:

Output:
openjdk version "1.8.0_242"
OpenJDK Runtime Environment (build 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08)
OpenJDK 64-Bit Server VM (build 25.242-b08, mixed mode)

After, continue below to install Apache Ant.

Step 2: Install Apache Ant via Apt

Apache Ant comes via Ubuntu default repositories. However, the version with comes with Ubuntu repositories might not be the latest version. If you wish to install the latest, you may have to install it manually or via third party repositories.

To install Apache Ant using apt-get, simply execute the following commands:

sudo apt update
sudo apt install ant

To verify if Ant is installed, use the commands below:

ant -version

It should output similar line as below:

Output:
Apache Ant(TM) version 1.10.5 compiled on March 28 2019

That’s how to install Apache Ant via Apt-get

Option 2: Install Apache Ant using SDKMAN

You can also install Apache Ant via SDKMAN tool.

SDKMAN is a tool for managing parallel versions of multiple Software Development Kits on most Unix based systems. You’ll need to install SDKMan too.

Installing SDKMAN! on UNIX-like platforms is as easy as ever.

Run the commands below to download and install.

sudo apt install curl
curl -s "https://get.sdkman.io" | sudo bash

After installing, you should see an output as similar to the one below:

All done!
Please open a new terminal, or run the following in the existing one:

    source "/home/richard/.sdkman/bin/sdkman-init.sh"

Then issue the following command:
    sdk help
Enjoy!!!

Next, activate it

source "$HOME/.sdkman/bin/sdkman-init.sh"

Lastly, run the following code snippet to ensure that installation succeeded:

sdk version

If all went well, the version should be displayed. Something like:

==== BROADCAST =================================================================
* 2020-03-18: Gradle 6.3-rc-3 released on SDKMAN! #gradle
* 2020-03-17: Gradle 6.3-rc-2 released on SDKMAN! #gradle
* 2020-03-16: Leiningen 2.9.3 released on SDKMAN! #leiningen
================================================================================
SDKMAN 5.7.4+362

After installing SDKMAN, simply run the commands below to install Apache Ant.

sudo bash
sdk install ant

After installing, it should output similar message as below:

Installing: ant 1.10.1
Done installing!
Setting ant 1.10.1 as default.

When finishes, you can verify whether Ant is installed successfully or not by checking its version:

ant -version

#labs #linux ubuntu #apache ant #ubuntu 18.04 #ubuntu 20.04 focal fossa #linux