Skip to main content

OpenSSH Public Key Authorization on Linux

To find out whether a user exists or not in a Linux machine:
*    grep username /etc/passwd
or
*    id username

To give a new user access to Linux machine:
1. Login as root user
2. Run this:
    $ /usr/sbin/adduser new_user
3. Set a new password:
    $ passwd new_user
    (and put the password when prompted)

To give them root access:
4. Edit the /etc/sudoers file
    $ vi /etc/sudoers
    User_Alias YOUR_GROUP = new_user
    YOUR_GROUP ALL=(ALL) NOPASSWD: ALL

To test whether the new_user has been granted root access, run these two commands:
    $ su new_user (user should be 'new_user' now)
    $ sudo su (user should be 'root' now)
If the conditions above met, then new_user has root access.

If the new_user want to use public/private key gen authorization:
5. Change your user to be the new_user
    $ su new_user
6. Create ~/.ssh/authorized_keys file if it doesn't exist yet
    $ mkdir ~/.ssh
    $ chmod 700 ~/.ssh
7. Insert the public key on the authorized_keys file
    $ vi ~/.ssh/authorized_keys
    (insert the public key entry)

Comments

Popular posts from this blog

Amigurumi: Mario Bros Mushroom

I found out that I had a stash of acrylic yarns left (in the storage), and so I was looking around for patterns/stuff I can use them for. I ended up finding Amigurumi , and of course the pattern I wanted uses the colors of yarns I did not already have. I ended up buying another stash of acrylic yarns in different colors. Thankfully, Zellers had it on sale. In any case, my first Amigurumi project was the Mario Bros Mushroom. I found out (too late), that I was doing the red part wrong. I crocheted from the back loop only, instead of from both loop. Hence, the "head" is taller than it's supposed to be. But since I didn't realize it until after the head was completed, I decided to leave it as it was. Mushy I gave this one to Chris, just because he wanted one. This became another addition to his "work buddies", as you can see below. Chris's "Work Buddies" But bad Chris! He made Mushy to be the bad guy (I think). Chris called this scene "

Video Submission Guide via YOUTUBE, wetransfer, etc

Ada banyak cara yang dapat kita pakai untuk submit video yang sudah dibuat ke editor.   1. Youtube 2. Email 3. Wetransfer / Megaupload / dsb 4. Whatsapp / LINE  Cara Submit Video melalui YouTube (recommended, namun BUKAN UNTUK VIDEO GREEN SCREEN) a. buka Chrome/Firefox, masuk ke YouTube website, atau bisa juga lewat apps kalo di HP b. login / daftar pake email google -- Note: kalau anda pernah follow channel YouTube apa pun, artinya step a dan b ini sudah berhasil. c. klik tanda camera di bagian atas (allow access kalau ditanya) d. (khusus di HP) Pilih upload Video (bukan Live Streaming yah) e. upload video yang diinginkan f. Set privacy ke UNLISTED <== very important, supaya orang lain tidak bisa melihat video kalian g. send me the link (via WA or email boleh) ==> link ini tidak hilang, kalian bisa cek di channel kalo lupa link nya apa. tapi tanpa link ini, orang lain tidak bisa melihat video kalian karena Unlisted. Video juga tidak bisa di search oleh user. Setelah step f atau