#unix

1 messages · Page 24 of 1

main olive
#

It says: Boot mode UEFI, Fast boot, enabled, usb boot enabled, pxe boot to lan enabled, ipv4 pxe first enabled

#

@grave jolt idk what since usb boot id enabled

vestal turret
#

Is there a boot order mentioned somewhere?

main olive
#

Only if I set uefi to legacy

#

Then it says boot order, legacy or uefi fiest

#

Oh in the Windows boot menu there a usb option, but it says "system doesn't have any usb boot option"

main olive
#

YOU HAVE GOTTA BE DUCKING JOKING

#

LMFAO

#

I made Ubuntu load, by literally unplugging and plugging in the usb drive

#

@vestal turret umm it says the pc has no detected is but it does I'm scared to erase my data, but idk what to do if I hit "something else"

vestal turret
#

I'm not sure, I use a different disk for every os

main olive
#

There's like partition tables and confusing stuff

#

Wait shit, how do I go back to windows

vestal turret
#

Same process as you did for booting into ubuntu.
The command in linux to reboot to bios is

sudo systemctl reboot --firmware-setup```
main olive
#

I didn't do anything to boot Linux all I did was restart

#

Oh lol I can just take out the usb

#

Lmao

#

Also what do you mean by different disc

vestal turret
#

hdd, ssd etc

main olive
#

Oh, wait so an en tire new pc?

#

Or like, external ssh

vestal turret
#

No, you can have more than one hdd or ssd in your pc.

main olive
#

Huh

vestal turret
#

I have 2 ssds and 4 hdds atm

main olive
#

How

vestal turret
#

Just plug it into the motherboard, there is usually more than one connection for them.

main olive
#

Wait so

#

Oooih

#

Right pc not laptop

#

Forgot computers are 2 parts

#

How can I do that on a laptop?

#

Can you connect a pc to a laptop and have 2 computers

vestal turret
#

I do have 2 ssd's on my laptop, I took out the dvd drive to make room for one.

main olive
#

Also where can I learn how to use Ubuntu?

#

Like a video going over the ui and stuff

vestal turret
#

It's very intuitive, and just google if you can''t find something.

main olive
#

Okie

main olive
#

Uhh @vestal turret so I can install Linux but it says it will erase everything from all operating systems, but then proceeds to let me choose a drive, will it remove Windows?

vestal turret
#

I wouldn't risk it.

main olive
#

That is if I choose a different drive than the one Windows is on

#

Yeah ok

vestal turret
#

Be sure to have a backup no matter what.

#

Something everyone should have anyway but too many people don't.

main olive
#

But the only other choice is "something else" which is really confusing to go thru

#

How can I backup?

#

I used google to sync my files

vestal turret
#

It's too late for me atm, can't help with something that delicate rn

livid forge
#

if you want to install multiple OSes you need either a dedicated disk partition or a dedicated disk

#

the partition will be reformatted, wiping anything that was on it

main olive
#

ok issues

#

I installed linux on another flash drive

#

but when I plug it in an restart it sorta works

#

it loads for a bit

#

but then gets stuck on a screen with a log

#

with a bunch of [ OK ]s on the left

#

and the last one was "started gnome display.ervice" or something

#

and it gets stuck ther

#

forever

livid forge
#

define stuck

#

does it put you into a terminal?

main olive
#

Nope

livid forge
#

its possible the video drivers are not compatible

#

stuff like this is why "the year of the linux desktop" is always current year+1

vestal turret
#

Does your laptop support optimus?

brittle night
livid forge
#

did you write this on windows?

#

probably a CRLF line ending instead of LF

#

if thats the case you can run dos2unix to fix

brittle night
#

@livid forge yup that worked! Thanks!

livid forge
#

np

regal mason
#

hey, im trying to host a webpage using nginx

#

but i dont know where to put my html file

limber sinew
#

/usr/share/www? Iirc

#

What directories are there in the nginx config folder

regal mason
#

in /etc/nginx?

limber sinew
#

Ya

regal mason
limber sinew
#

Sites enabled

regal mason
#

i tried

#

but it loads up the default one

limber sinew
#

Is the any file in sites enabled

regal mason
#

i copied my index.html and put it in there

limber sinew
#

No you don't put any HTML in the config folders

regal mason
#

r i p

limber sinew
#

Is there any file in sites enabled

regal mason
#

default

limber sinew
#

Open that

regal mason
#

with vi default?

limber sinew
#

vim?

regal mason
#

yeah

limber sinew
#

Have you learnt vim

regal mason
#

yteah

limber sinew
#

Okay yeah any editor is fine

regal mason
#

vim isnt installed

limber sinew
#

Or use less

regal mason
#

yeah i opened it

limber sinew
#

I guess just vi then

#

If you know how to get around in it

regal mason
#

yeah

#

do i change the server example code?

limber sinew
#

Might not need to

regal mason
#

index is index.html i just want to repalce it with mine

limber sinew
#

Does it have a line for a root directory or something

#

Not index

regal mason
#

root /var/www/example.com;

limber sinew
#

Ahh

#

That's the only line?

regal mason
#

i cna show yoiu

limber sinew
#

With root in it

regal mason
#

SSL has root /var/www/html

limber sinew
#

That folder will probably work

regal mason
#

i tried copying my index.html into the folder

limber sinew
#

You should be able to Chuck files in there

regal mason
#

in /var/www/html

limber sinew
#

Ya

regal mason
#

its already in there

#

i put my index.html in there

#

but it still shows the nginx one

limber sinew
#

Does it have right permissions for nginx to access as well?

regal mason
#

i used sudo

limber sinew
#

Rename it blah.html

#

And try to visit /blah.html

regal mason
#

how to rename

#

mv index.html blah.html?

limber sinew
#

Ya

regal mason
#

does it work now?

limber sinew
#

You tell me

#

Or you can follow a guide on doing this as well you know

#

The are heaps

regal mason
#

i did

#

but it doesnt show

limber sinew
regal mason
#

it still returns the welcome to nginx page

#

instead of my blah.html

limber sinew
#

Did you visit /blah.html

regal mason
#

oh true

#

okay thanks

#

:)))

limber sinew
#

That worked?

regal mason
#

yeah it did

#

i just need to fix my html links thanks a lot @limber sinew

limber sinew
#

So at least directory and permissions are working

#

But sure about the index.html would need to debug more

#

*not sure

regal mason
#

yeah as long as i get the page up should be fine

regal mason
#

im trying to display some images using nginx but i cant get it to display

gritty stirrup
#

@regal mason Can I see your config?

regal mason
#

whers that

#

is that the /etc/nginx/nginx.conf?

#

location /images/ {
}
is this what i add? @gritty stirrup

gritty stirrup
#

The way I do it, is have a subdomain

#

With all my images

#

And just make it's root option the images folder

regal mason
#

i dont quite understand that

gritty stirrup
#

Go to mcadesigns

#

And site.conf

#

That's my nginx config

#

Then look for i.mcaq.me

#

That's my image storage

#

Heres a example if it working

#

What are you actually trying to build?

regal mason
#

serving a static webpage

#

just display some images depending on drop down menu using html

#

hosted on nginx

gritty stirrup
#

Like in the website?

regal mason
#

yeah

gritty stirrup
regal mason
#

but isnt it unix

#

cause i dont know how to use nginx

#

XD

gritty stirrup
#

You can't do this with NGINX

#

You need to use a programming lang

#

To put in the HTML code

regal mason
#

?

gritty stirrup
#

Look into flask: that's how you do this with python

#

To display the images in your website, you need to code it

regal mason
#

i did

#

i used js

gritty stirrup
#

Oh

#

What's the issue then?

regal mason
#

webpage wont load images

gritty stirrup
#

It can't see the files?

regal mason
#

its like blank

gritty stirrup
#

Look in the Dev options; what's the error?

#

Like the chrome Dev page

regal mason
#

it says not found

#

i dont get this file structure in nginx

gritty stirrup
#

Nginx has a root option

#

This is where it starts searching for data from

#

Anything outside of this will be impossible to see

regal mason
#

so ihave to move the files into root?

gritty stirrup
#

No.

#

Nginx has a root option

#

In the config

#

You set root to where you want your stuff to be

#

And move everything you want to be seen there

regal mason
#

where is the root folder in nginx

#

server {
location / {
root /data/www;
}

location /images/ {
    root /data;
}

}

#

?

gritty stirrup
#

You see how you have a location option?

#

Just look at my code

#

mcadesigns and site.conf

#

You will see the root option being used

#

@regal mason

regal mason
#

i cant ifnd it

#

this is what i did

#

i edited the /etc/nginx/sites-enabled/default

#

@gritty stirrup

gritty stirrup
#

That should work

#

Make sure all your images are in that foldsr

#

And you change your js code so it knows they are there 2

regal mason
#

wowwwe

gritty stirrup
#

There's a error in your file

#

You need your server_name to be the domain name

#

It also gave you a command to try: try it!

regal mason
#

my domain is the ip?

#

it says the config file failed

#

nvm it says okay when -t

#

@gritty stirrup

#

did i map it wrong?

gritty stirrup
#

@regal mason Is that folder in the root folder you specified?

regal mason
#

i cd into the folder with my images

#

then i did readlink -f envy_business.png

#

to get the path copy and paste it into root

#

the permissions are okay

gritty stirrup
#

@regal mason just move all your images to /var/www/html

#

That is the only place nginx can see them from

#

Because root /var/www/html

regal mason
#

r i p

gritty stirrup
#

@regal mason Just move them to /var/www/html/images

#

Then they can be seen

#

Or make your root

#

/home/ubuntu/project/webapp

#

That's likely a better solution

regal mason
#

yeah it worked

#

thank you so much @gritty stirrup

gritty stirrup
#

nP

runic flame
#

Howdy

#

On Ubuntu Server It came with https://prometheus.io pre installed
This uses the web port ":9090"

However, Normally for my servers I use Cockpit multiserver manager
This also uses port ":9090"

How do I uninstall Pometheus? Tried sudo apt-get remove prometheus but it litterally says its not installed (obviously is)

Any ideas?

gritty stirrup
#

@runic flame Why not change the port it uses?

runic flame
#

idk how

main olive
oak shell
#

press Esc and look for any error messages

civic iron
#

Is this a good place to as GIT questions?

robust cave
civic iron
#

@robust cave Thanks

wide lance
#

Does anyone know if it is possible to run ubuntu remote desktop on a headless server. I need to be able to run some pyautogui code which needs an interface to operate, so I was wondering if I could just use the remote desktop on the headless server as a work around

livid forge
#

i dont know what the modern equivalent is, but you can do x forwarding over ssh

warped nimbus
#

Well wouldn't a headless server by definition not have x server?

#

You may need xvfb

wicked marsh
#

Yep, xvfb plus a VNC server (I went with x11vnc but I don't think it's actively maintained anymore)

livid forge
#

i believe you need x installed on the remote host, but it doesnt need a DE or anything

#

its still technically headless

#

you should just be able to do it over regular ssh with -X

#

(i haven't used it in about 13 years)

main olive
#

hey so I got ubuntu to load

#

but its slow

#

very slow

#

like sometimes it works fine, and then it just freezes out of nowhere

#

I am booting it from a USB stick, but its a Patriot Rage 2

#

advertising 400mb/sec

oak shell
#

check with e.g. top or htop what it's doing

#

whether CPU is fully loaded, or RAM is full and it starts swapping

#

or check iotop to get an idea about IO-heavy processes

#

you can also use sudo hdparm -t /dev/sdX to test the real read speeds of your drive (replace the X with the correct letter)

main olive
#

Well I tried to restart

#

And now its not loading again

#

I pressed escape and it told me "you are in emergency mode"

#

I did cntrl D

#

Stays for a while on "starting default target"

#

Then goes back to you are in emergency mode

#

Also there's this timer of I restart that's 1 minute 30 seconds

oak shell
#

timed out waiting for disk

#

that means the entries in your /etc/fstab don't match the real devices/partitions you currently have on this computer

main olive
#

So what do I do

oak shell
#

can you run lsblk -f from that emergency thing?

main olive
oak shell
#

yeah, now try nano /etc/fstab and edit that file so that the UUIDs match

main olive
#

Ooh editor

oak shell
#

/boot and swap are broken, according to the boot messages earlier

main olive
#

Ok

#

How can I just make it go back to before

#

Like default

oak shell
#

there is no default

#

this config is always specific to your machine

main olive
#

And while we are here, how can I do that noatime thing, people said thwt speeds up ubuntu

oak shell
#

and these UUIDs also change every time you format the partition

grave jolt
#

yeah it appears to be looking for a partition or something with a uuid that starts with b265

#

like byte said that only changes if reformat a disk, but there are a lot of reasons it might not be able to see it
eg you removed the disk, the disk died and so on

main olive
#

So what can I do

grave jolt
#

well you need to find that partition and put it back where the computer can see it, or figure out what that uuid changed to and edit fstab/the boot menu

#

now there could be another issue
i see it talking about encrypted volumes

#

did you encrypt a partition?

#

if so, then the boot process has to have that decrypted before it can see the uuid

main olive
#

Can I have the computer do that, like can I have it remake the entire thing when I delete it or somethin

grave jolt
#

not really no, if you delete something its possible but difficult to get it back and it can easily be lost if anything else is written to the disk

main olive
#

I tried to change the fstab file

#

And uhh

#

Well I tried to make this thing with noatime

#

Idt it worked lol

grave jolt
#

if you edited fstab / grub's config after it booted the first time and then restarted

#

then whatever you edited broke it

main olive
#

Probably

grave jolt
#

always make backups of critical config files like that before you edit them

#

eg just cp it to thatfilesname.bak

main olive
#

Ok

#

So what do I do now

grave jolt
#

well youll have to figure out what the file you edited is supposed to look like or reinstall and next time keep a backup of any config files you change so you can revert and try again

main olive
#

Howe

grave jolt
#

for fstab there are some examples online but you have to make sure you have your own uuids in it
for grub i would boot a distro off usb or something and chroot in to your file system then run dpkg-reconfigure grub

main olive
#

If it won't load, how do I get to the backup anyway

grave jolt
#

so hold on

#

i see something

#

in your lsblk it shows bb265c

#

in your boot pic i see b265c

main olive
#

Yeah

grave jolt
#

i think you deleted a b off the front of the uuid in a config file

main olive
#

I'm still in the nano editor and I see a b

grave jolt
#

how many?

#

the partition uuid has 2

#

you can see it in your lsblk screenshot

main olive
#

Oh I have 1

#

Added a b

#

So so I save now

grave jolt
#

yeah assuming thats the only thing you messed up

#

then rebooting should work

main olive
#

Well, I tried adding some stuff to make my USB go faster

#

I want to remove that, and do it the right way

oak shell
#

maybe you should try to fix it first before making it faster...

main olive
#

What do I remove and what do I keep

#

Well yeah, but I'm scared the code I "wrote" will mess it up still

oak shell
#

don't explicitly mount stuff like sys, proc, shm and that stuff

grave jolt
#

if that was there dont remove it

#

if you put it there, remove it

main olive
#

Well I don't know what was there and what wasnt

grave jolt
#

i'd leave it for now then since i think thats often in there and not all distros do it auto
but i dont see anything else really jumping out at me

oak shell
#

those are virtual file systems created and managed by the kernel, that stuff definitely does not belong in an fstab, I've never seen it there. Even if it doesn't break things (which I doubt), I see no benefit

#

just /, /boot and swap

main olive
#

What

#

What do you mean

grave jolt
#

i think it entirely depends on the distro.
I have proc in my fstab on my server for example but not on one of the vms

#

something has to mount those, and if its not the init system then it could be fstab

oak shell
#

remove the last four lines that are not physical partitions or mapper volumes, IMO

grave jolt
#

i would leave them alone unless we see another error from them because getting them back in there is a huge pain

oak shell
#

¯_(ツ)_/¯

grave jolt
#

so i would NOT remove them unless they are shown to be an issue

main olive
#

Ok, just did it

#

Let's see if it works

#

Starting default target

oak shell
#

the swap line is probably still wrong

#

I think it should have none swap sw instead of swap swap defaults

main olive
#

Hey it loaded

#

So next issue

#

It freezes all the time

#

Also what's a good better Windows 10 looking modern theme

gritty stirrup
#

@main olive Rainmeter lets you make things look really nice.

main olive
#

what

#

hey so I installed chrome

#

but when I right click and check properties

#

it says it cannot find the file

worn apex
#

@oak shell i see the virtual file systems in fstab all the time - on a pre-systemd setup, if they're not in there they don't get mounted... don't know what voodoo systemd does

oak shell
#

I've never seen those anywhere 🤔

worn apex
#

they're not there on my current ubuntu system, but i know they were there three or four years ago

oak shell
#

why would you manually specify standard system things like these? They must be the exact same on every Linux anyway

worn apex
#

the kernel doesn't know that

#

you might be doing some exotic setup where you don't mount /proc at all for security

#

anyway, mount points bind to directories that exist, so it has to be mounted after the root filesystem

#

idk anyway i need to go soon

oak shell
#

is it possible to run without proc??

worn apex
#

yeah, just stuff like ps won't work

#

various other subtle breakages, but it won't immediately grind to a halt - if you have a userspace that doesn't use any of that it'd be fine

main olive
#

so why is ubuntu so slow for me

oak shell
worn apex
#

anyway, it's partially a separation of concerns thing - it's implemented in the filesystem layer as an ordinary filesystem so you can mount it or not inside chroots etc

main olive
#

literally I cannot search anything without chrome saying it isnt responding

#

oh and it crashed

oak shell
#

did you use the commands I gave you earlier to check whether the bottleneck is ram, cpu, io, ...?

main olive
#

can you say it again

#

every time I scroll it freezes

oak shell
#

🙄

#

ByteToday at 21:44
check with e.g. top or htop what it's doing
whether CPU is fully loaded, or RAM is full and it starts swapping
or check iotop to get an idea about IO-heavy processes
you can also use sudo hdparm -t /dev/sdX to test the real read speeds of your drive (replace the X with the correct letter)

main olive
#

wait

#

so I just type htop

#

in terminal

oak shell
#

yes

#

but it might not be installed, in that case sudo apt install htop iotop

main olive
#

terminal is just empty

#

oh it loaded finally

#

what do you mean by X as the correct letter

oak shell
#

e.g. /dev/sda if that is the drive you're running off

#

whatever is mounted as your root

main olive
#

how do you know what drive you are running off

oak shell
#

you had an lvm mapper in your config before

#

but it should still show that in lsblk

main olive
#

wait so I installed it

#

but when I do htop it still says it doesnt exist

main olive
#

God this is so frustrating, it freezes So often I can't do anything

#

"files has stopped responding"

#

Also how do I move files into a folder without it telling me I have no permission

#

I can't even type without it freezing

#

It's freezing while shutting down So it can't even do thsy

main olive
#

so @oak shell I got it to show me it htop

#

but it doesnt look like theres any clog up

oak shell
#

and in iotop?

main olive
#

I see:

1: 6.5%
2: 5.2%
3: 3.1%
4: 3.5%
Mem: 20.6g/7.70g
Swp: ok/ok
oak shell
#

mem 20g/7g 🤔

main olive
#
Netlink error: Operation not permitted (1)

The Linux kernel interfaces that iotop relies on now require root privileges
or the NET_ADMIN capability. This change occurred because a security issue
(CVE-2011-2494) was found that allows leakage of sensitive data across user
boundaries. If you require the ability to run iotop as a non-root user, please
configure sudo to allow you to run iotop as root.

Please do not file bugs on iotop about this.
#

so I do sudo right

oak shell
#

yeah

main olive
#

oh wait

#

for mem

#

thats a typo

#

2.06g

oak shell
#

yeah, that's okay then. No real load there

main olive
#

its like something is stopping linux from using all its avaliable resources

#

so what am I looking for in iotop

oak shell
#

any high numbers in the four columns in the middle

#

should be sorted by highest on top

#

*constantly high

#

like >90% IO all the time or so

main olive
#

oh

#

yeah

#

umm so I just opened tweaks

#

and like 3 things in IO are 99.99

#

hehehe

#

that might be an issue

#

why is that happening?

#

like what is the fault?

oak shell
#

dunno, what are they?

main olive
#

python3 ~ome-tweaks or something

#

kworker something

#

jbd2 something

oak shell
#

jbd2 is the journaling block device driver or something like that

#

so it has something to do with file system access etc

#

kworker are kernel worker threads, i.e. the stuff that processes your applications syscalls or so

#

and gnome-tweaks... yeah, no idea why that would spin up like this

#

might be the cause, the other two are rather just symptoms

#

so you did verify your iso before the install?

#

you might also consider trying to boot a different kernel version, in case your current one has a bug/regression in combination with your specific hardware or whatever, that can happen

#

you can also keep a terminal with dmesg -w open and watch for any incoming kernel error messages that could indicate hardware or driver problems

#

but I'll go fromtimeimportsleep now

main olive
#

umm

#

what do you mean verify the iso before install

oak shell
#

check the hash sums of the download

#

and/or select the "check disk for defects" boot option of the installer once

main olive
#

rip

#

i did not do that

#

do I need to reinstall linux again

main olive
#

wait what

#

I just got a theme

#

but the dock on the left side and everything is still the same

#

how do I have the theme change that

main olive
#

question

#

what is the best flavor of ubuntu to get the latest customization tools

#

I know Plasma Kubuntu is good

#

but is it the best?

white solar
#

Pop os or.maybe ubuntu 19.04

#

Idk about xubuntu

main olive
#

im on 19.04 rn

white solar
#

Take a look at pop os then

main olive
#

ok

main olive
#

so when I try to use the ui to change system folders

#

it says I don't have permission

#

and doesn't allow me to

#

alteast in windows they gave you the option anyway

#

how can I do that in ubuntu

robust cave
#

the ui?

white solar
#

admin permission

#

sudo thingy

main olive
#

using the ui

robust cave
#

do you mean the terminal?

#

like, can you give a screenshot/an example?

white solar
#

i am confused

robust cave
#

ui means User Interface, do you mean the GUI? that's Graphical User Interface, which in the context of a default Ubuntu Gnome file manager, would be Nautilus

main olive
#

gui

#

hehe tha

#

yeah I need to use nautilus

robust cave
#

I don't think there's a trivial way to do that, you might want to use the terminal

main olive
#

trying to install Atom Beta on ubuntu

#

I got the deb

#

did dpkg thingy

#

and it shows up

#

and I click on it

#

and it loads for a bit

#

and nothing happens

#

also its blue not orange and im sad

#

also alot of the apps, if I click on it and hit properties, it says "could not find {file}"

gritty stirrup
#

@main olive Are you still using Linux from a pendrive?

white solar
#

Yeah it could be it

#

I tried to install some drivers while using lubuntu from live drive

#

And i couldn't get it to work

main olive
#

pendrive?

#

whats that?

#

you mean like im on the "demo" version?

#

no I installed it fully

main olive
#

wtf

#

I can't even get packages from the ubuntu software without it saying I don't have permission

#

Why can't I just use the GUI as root?!

gritty stirrup
#

@main olive You don't use Linux to use the GUI

#

learn how to use apt, wget and curl

main olive
#

I cant install things off the snap store

#

I don't think thats intentional

gritty stirrup
#

Just use snap in terminal

#

Or log into Ubuntu as root.

main olive
#

can I make myself root?

gritty stirrup
#

I think you can sign in as root.

main olive
#

can I make myself root?

gritty stirrup
#

Yes... but please don't

#

Use terminals to install stuff

#

Almost every tutorial uses apt-get

main olive
#

ok then

#

its just much easier for me to hit install and not tell me I can't install

gritty stirrup
#

If you want the "real Linux experience"

#

It's with terminals

#

Just use a terminal

#

And if it errors, just add sudo to the end of it

main olive
#

I added sudo

#

shit

#

thanks for not copying

#

sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set

worn apex
#

...lol you broke sudo

main olive
#

same error when installing from the Ubuntu Software

worn apex
#

or something broke it anyway

#

uh i don't know if there's an easy way to recover from that

#

(like, i could do it, but it requires rebooting in single user mode in a way that is not easy to walk you through)

main olive
#

I don't know if I am going to make a full switch if stuff like this happens all the time

#

which it is happening all the time right now

#

should I reinstall linux?

#

ima do that

#

not like I have any unsaved work

gritty stirrup
#

I have no idea why you are having soo many issues.

#

Are you dual booting?

#

Something strange?

#

What version of Ubuntu are you installing?

grave jolt
#

Uh did you run a command to change file permissions / file owners as root? It looks to me like you somehow changed the permissions of the sudo program, and for security reasons it's refusing to run.

gritty stirrup
#

@grave jolt I think it's some sort of dual boot

#

make the full switch his language suggests to me

grave jolt
#

Yeah but that would have nothing to do with this error

gritty stirrup
#

Ok.

#

Couldn't windows have touched a file it wasn't meant to?

grave jolt
#

No

#

It can't even see the file system. Windows doesn't support non Ms filesystems

#

If it touches anything it would be by deleting the whole file system and replacing it with an empty vfat or NTFS one

#

This is also not an error I would expect to see due to filesystem corruption really, though they can check the system logs to be sure. There would be a lot of other errors if there are drive or other hardware issues

oak shell
#

I expect he thought something like "I want that all files belong to me" and chowned the system

#

especially after the "can I login as root" questions

#

so yeah, that of course breaks everything

#

and sudo is not refusing for security reasons, it needs owner root and suid bit set to work. That is the only way it can actually gain elevated privileges in order to pass them to other programs, afaik

grave jolt
#

yes that is correct, security isnt the reason myb. setuid and owner root make linux run it as root regardless of who executes it. then it figures out if you have the right permissions to do what you told sudo to do

#

if its run as you user it wouldnt have the priv it needs to run as anyone else

#

oh however, if you managed to change the permissions of important files like sudo you prob ruined the install.

worn apex
#

though of course it also doesn't like if /etc/sudoers is accessible to anyone other than root, and that one is for security reasons

grave jolt
#

yeah there are likely a ton of files that want specific priv for one reason or another, ssh, su, various config files etc
and messing up those permissions means you might as well reinstall because its a huge pain to restore them if yo udont have snapshots/backups of those files with the right permissions

oak shell
#

correct

main olive
#

ah sorry

#

rip

#

well I reinstalled ubuntu

#

but I wanted to try kubuntu

#

so I did that

#

and theres this sweet theme

#

called sweet

#

and its like transparent

#

but when I put it on it isn't transparent

#

I can make the window decorations cool

#

but how do I make the window itself transparent

median swan
#

weird question

#

so I have an ubuntu server that I can log into. I want to generate ssh keys from the server that I can distribute to clients (rather than generating on client and registering with the server). Is that possible?

vestal turret
#

It should work the same.

median swan
#

how do I register the keys though

#

(or another question: how would I generate new keys from a client if I already have passwordauthentication disabled?)

median swan
#

ah, I just manually added to my authorized keys

runic flame
#

howdy. How do I quickly preferably in as little commands as possible make a python3 file a .service. So I can do shizzle like systemctl restart blahblah.service

white solar
#

Make __init__.py file in the home directory of your file/project

oak shell
#

You have to write a service file. That has nothing directly to do with python, it's the same for everything.

runic flame
#

ah thanks

oak shell
#

Is it safe to delete the .cache/pipenv/http folder? Thing is taking up over 1GB of precious space, and if that is really only download cache, it's worth to clean up.

warped nimbus
#

What other kind of cache could it be if not that?

#

Though I thought it had a cache in addition to pip 🤔

oak shell
#

pip cache is different, but a lot smaller

#

though structurally .cache/pip and .cache/pipenv look similar, so I guess pipenv just uses its own and doesn't care about pip

#

moved to trash now, if nothing breaks in the near future I'll empty it.

warped nimbus
#

For what it's worth I do know that pipenv uses pip's environment variable to disable its own cache too

#

So it cares about it in that regard

oak shell
#

¯_(ツ)_/¯

stiff tiger
#

i was facing some problems on setting up a dl environment
from these instructions
https://medium.com/@k_efth/deep-learning-in-arch-linux-from-start-to-finish-with-pytorch-tensorflow-nvidia-cuda-9a873c2252ed

in ""The Deep Learning Stuff
for the second command here do i need to create this directory? https://gyazo.com/4e2ac7758ab6f1a98bcf1c8645f2ebd5 https://gyazo.com/b094ad97d522519dfd8e1a3cc7e44641
its giving an error in manjaro

Medium

This article serves one purpose: I always end up searching for the same information when I install Arch so I need a guide tailored for my…

#

in manjaro

#

gnome

gilded sparrow
uneven kayak
#

so, when you see help text saying "try/add/use --some-option"

#

it means that you add it to the command itself

gilded sparrow
#

It doesn't say that

uneven kayak
#

--some-option is not a command of itself, it is rather an argument to a program that you're trying to run. the description is telling you that you can relax the check by doing adduser Monopoly --force-badname

gilded sparrow
odd forge
#

--arg and -arg almost always indicate a command line argument

gilded sparrow
#

i get this for adduser Monopoly --force-badname

#

the command doesn't work

uneven kayak
#

okey, and the error message wasn't super informative.. but you can try to search around for why adduser exits with error code 1

odd forge
#

the man page might be a good place to start

#

man useradd

uneven kayak
#

useradd and adduser are different, no?

odd forge
#

adduser just calls useradd anyway

gilded sparrow
#

Yeah

#

same thing

odd forge
#

and it's useradd returning the error code

gilded sparrow
#

and none are working

#

i don't understand

#

why can't i add fucking users to my vps

#

sorry i am angry now

odd forge
#

the man page tells you what error code 1 means

gilded sparrow
#

I want the old command back

#

adduser

uneven kayak
#

useradd exit code 1 means "can't update password file", which I find somewhat strange, and maybe even hard to believe, given that he's running the command as root

odd forge
#

that makes 2 of us

gilded sparrow
#

sooo... what do i dooo

odd forge
#

if you do cat /etc/passwd do you get a result? (please don't show us the result tho)

vestal turret
#

You get the badname problem because of the capital M

gilded sparrow
#

no

#

i tried all lowercase

#

@vestal turret i get a long result

odd forge
#

weird. grote should be right because the regex is [a-z_][a-z0-9_-]*[$]

gilded sparrow
#

i'm using lowercase

#
useradd: cannot open /etc/shadow
root@debian:~#```
odd forge
#

ah that's more helpful

gilded sparrow
#

xD

#

sorry, me noob

vestal turret
#

useradd and adduser arent' the same thing

gilded sparrow
#

ok

odd forge
#

adduser still makes use of useradd in the end tho...

gilded sparrow
#

this is making me feel :(){ :|: & };: 😢

#

i need a fix :/

vestal turret
#

it uses useradd in the backend, but you still shouldn't use that.

odd forge
#

that's true yea. but still doesn't explain the issue at hand

gilded sparrow
#

guys

#

please

#

i don't have much time

#

left

bright latch
#

anyone familiar with termios?

#

can I use setcbreak and turn echo on?

gilded sparrow
#

bruhh

bright latch
#

or is there another way

gilded sparrow
#

i'm trying to get help

#

go to another help channel

placid bough
#

calm down jeez

#

@gilded sparrow what's the problem

gilded sparrow
#

i can't add users on my vps

placid bough
#

what operating system ?

gilded sparrow
#

even as f||lippin||g root

#

debian

#

latest

placid bough
#

any messages sent in terminal ?

odd forge
#

problem is that it's impossible to open /etc/shadow

#

which is weird as root

vestal turret
#

what are the permissions on etc/shadow?

gilded sparrow
#
Adding user `testaccount' ...
Adding new group `testaccount' (1014) ...
Adding new user `testaccount' (1005) with group `testaccount' ...
useradd: cannot open /etc/shadow
adduser: `/usr/sbin/useradd -d /home/testaccount -g testaccount -s /bin/bash -u 1005 testaccount' returned error code 1. Exiting.
root@debian:~#
#

wtff

odd forge
#

do a ls -la /etc/shadow pls

placid bough
#

ehm.

gilded sparrow
#

ok

bright latch
#

is root from sudo -i? debian doesnt enable root password iirc

gilded sparrow
#
-rw-r----- 1 root shadow 1533 Apr  2 17:19 /etc/shadow
root@debian:~#
#

wdym

#

yes it's sudo -i

#

i disabled direct root login

bright latch
#

yeah check the suders file

gilded sparrow
#

i don't think shadow exists in /etc... i can't see it.

#

i'm root u know?

placid bough
#

it does iirc

gilded sparrow
#

my account is in sudoers

placid bough
#

at least, it did back in ubuntu 8.08

#

i doubt debian would have changed

odd forge
#

your permissions are correct for /etc/shadow

gilded sparrow
#

but i can't even see /etc/shadow in a FSTP

bright latch
#

not just the account, but the rules

gilded sparrow
#

it's not there

odd forge
#

can you do lsattr /etc/shadow as well please

#

well the file exists

gilded sparrow
#
root@debian:~#
placid bough
#

shadow is a file

odd forge
#

yea it isn't a directory

vestal turret
#

it's a file, not a directory

gilded sparrow
#
-----a------------- /etc/shadow
root@debian:~#```
#

why does it switch between root@ and bash-

#

that's weird

#

too

placid bough
#

it's not

gilded sparrow
#

ok

vestal turret
#

you shouldn't really login as root ever tbh

gilded sparrow
#

ok but still

#

is there a fix

bright latch
#

why not

placid bough
#

did you sudo su ?

vestal turret
#

great way to break stuff @bright latch

bright latch
#

meh

gilded sparrow
#

sudo su?

#

wdym

#

i did sudo -i

odd forge
#

having to type sudo everytime makes it less likely to fuck up from my experience

placid bough
#

sudo su -

#

in user account

gilded sparrow
#

they do the same thing lol

placid bough
#

¯_(ツ)_/¯

gilded sparrow
#

can't add users :/

#

imma cry

odd forge
#

that a flag is weird tho

#

on my system the output is -------------e-- /etc/shadow

placid bough
#

ill head on mine and check which is which

bright latch
#

try sudo su, if you havent already

placid bough
#

he said it's the same as sudo -i

#

so /shrug

gilded sparrow
#

i did sudo su

#

it gives you root...

#

¯_(ツ)_/¯

placid bough
#

yea that a flag is weird

odd forge
#

sudo -i is a little different than sudo su and sudo -s but that shouldn't be an issue

bright latch
#

what about the permissons now?

gilded sparrow
#

same error

placid bough
#

gotta do chattr

odd forge
#

was about to suggest that

gilded sparrow
#
Adding user `fuckmylife' ...
Adding new group `fuckmylife' (1016) ...
Adding new user `fuckmylife' (1005) with group `fuckmylife' ...
useradd: cannot open /etc/shadow
adduser: `/usr/sbin/useradd -d /home/fuckmylife -g fuckmylife -s /bin/bash -u 1005 fuckmylife' returned error code 1. Exiting.
root@debian:~#
#

what?

odd forge
#

chattr -a /etc/shadow

placid bough
#

chattr -a /etc/shadow

#

iirc

gilded sparrow
#

you know it's making all these "groups" each time i attempt, it means i can't use that name again. how do i delete those too?

placid bough
#

and chattr +e /etc/shadow

odd forge
#

+e can't be set

#

it's a file system thing

placid bough
#

ah

gilded sparrow
#
root@debian:~#```
#

so?

odd forge
#

try again now

vestal turret
#

that's a filething.

#

a is for append only though, would that give a cannot open message?

odd forge
#

maybe. I mean there is no reason for that flag anyway

gilded sparrow
#

fixed?

#
Adding user `ihatedebian' ...
Adding new group `ihatedebian' (1017) ...
Adding new user `ihatedebian' (1005) with group `ihatedebian' ...
Creating home directory `/home/ihatedebian' ...
Copying files from `/etc/skel' ...
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Changing the user information for ihatedebian
Enter the new value, or press ENTER for the default
        Full Name []:
        Room Number []:
        Work Phone []:
        Home Phone []:
        Other []:
Is the information correct? [Y/n] y
root@debian:~#```
odd forge
#

yea

gilded sparrow
#

but

#

i need to delete previous "groups"

#

all those errors before

#

failed accounts

#

they apparently exist somewhere

odd forge
#

not sure they show up anywhere

gilded sparrow
#

nope

#

no home dirs

vestal turret
#

no home dirs doesn't mean they arent' a user

gilded sparrow
#

exactly

placid bough
#

i also make sure to do chattr +i /etc/shadow so i dont make a user i dont want

gilded sparrow
#

so i need to delete them

#

what's that @placid bough

placid bough
#

immutable

#

can't be changed

gilded sparrow
#

huh?

#

explain to a noob

odd forge
#

do a cat /etc/passwd and see if they show up

placid bough
#

i did explain

#

cant be changed

bright latch
#

wait what command are you using to add users?

gilded sparrow
#

should i show the message?

placid bough
#

he used adduser last

bright latch
#

ok

placid bough
#

so i assume adduser

odd forge
#

which message?

gilded sparrow
#

no it's not there

#

they don't show up

odd forge
#

then they don't exist

gilded sparrow
#

all i have is this:

#
adduser: The group `monopoly' already exists.
root@debian:~#

#

^

placid bough
#

single-poly

odd forge
#

wait

gilded sparrow
#

they do exist apparently

placid bough
#

just do groupdel group

gilded sparrow
#

group group does not exist

#

oh wait nvm XD

#

ok, so now we go back to the very first question i needed help with.
making a python file start upon a user login.
so i added python /etc/ServerRestrictor.py to the end of that user's bashrc file
and got this:

#

(as root)

placid bough
#

su into the user

gilded sparrow
#

ok

placid bough
#

then add the file to bashrc

#

dont do it as root unless you want the user to not have a useable bashrc

gilded sparrow
#

why

#

how does that work

#

but the question is:

#

should i normally have permission?

#

to edit it?

placid bough
#

as root yes

#

ofc

gilded sparrow
#

then my vps is super gae

placid bough
#

or you're inexperienced with sysadmin

#

i meannnn

gilded sparrow
#

chmod +777 /home ?

placid bough
#

no

gilded sparrow
#

rip

vestal turret
#

If the file is owned by root, the user can't really do anything with it.

gilded sparrow
#

not owned by root

#

just edited by root

#

in text editor

placid bough
#

then definitely owned by root

gilded sparrow
#

Ok It Works 😃

#

btw it's a restrictor

#

means they can't access the terminal.. just commands inside the script.

#

which open other scripts

#

and their paths

#

and bam i have a commands list

vestal turret
#

that's one of the problems you can run into with running as root, accidently changing file owners.

gilded sparrow
#

so what? copy and paste a really long password enter it and then delete it so you won't ever remember it

#

i'm gonna try and get a script that monitors and key logs users idfk how

placid bough
#

im gonna guess you've not been using linux for a while

outer reef
#

@gilded sparrow Not really something we offer support on

#

!rule 5

shy yokeBOT
#

5. We will not help you with anything that might break a law or the terms of service of any other community, site, service, or otherwise - No piracy, brute-forcing, captcha circumvention, sneaker bots, or anything else of that nature.

outer reef
#

Key logging falls under that rule as well

gilded sparrow
#

Oh

#

what are all the commands to break out of a python script?

#

i'll test it and see if they can escape or not.

#

if they can i'll paste like x1000 of python /etc/ServerRestrictor.pys

outer reef
#

CTRL + C is the typical one to break out of a running script

gilded sparrow
#

doesn't work yay

#

i tried every letter with ctrl none worked.

vestal turret
#

you can catch a ctrl c

#

dont' ever do that hough 😛

gilded sparrow
#

😉

#

is that what i've done?

vestal turret
#

I don't know what you've done

gilded sparrow
#

disabled CTRL

#

key

#

@vestal turret i have a question

#

i'm unable to drag some files into /etc using sftp mobaxterm i get this:

vestal turret
#

Why are you trying to copy over pyc files?

gilded sparrow
#

no it's giving me permission denied error message

#

on root user

#

i'm moving files from my desktop to the /etc directory

placid bough
#

wh

gilded sparrow
#

but it won't let, wtf

placid bough
#

what on earth are you manually copying user files to /etc for

gilded sparrow
#

well then how do i do it 🤔

placid bough
#

dont even know what youre trying to do, firstly

gilded sparrow
#

i just told u tho

#

move files from my PC desktop

#

to my vps /etc directory

placid bough
#

why do you want to do that

gilded sparrow
#

BECAUSE I WANT THE FILES ON MY VPS 😠

placid bough
#

that's not what i'm asking

#

i'm asking, why /etc

oak shell
#

/etc is for system configuration files

placid bough
#

which is a system folder

gilded sparrow
#

yes

placid bough
#

wh

gilded sparrow
#

they are system files

#

and bash

placid bough
#

i really dont want to play part of potentially messing up your stuff, sorry

gilded sparrow
#

permission denied as root, why is root permission denied

#

that's all im asking

#

why is the highest account on the vps not allowed to access

outer reef
#

Wait, in just bare /etc?

#

Not like in a folder within etc?

placid bough
#

that's what i assume anyway

outer reef
#

Well that's probably why

#

You'd want to have it in its own folder regardless

#

And even then, there really isn't a good reason to have it in etc

placid bough
#

also /opt

outer reef
#

The entire thing feels like a big hack that I'm not overly comfortable with here

oak shell
#

I didn't scroll up far enough to read the context and be as shocked as I should be, probably

main olive
#

@gilded sparrow I had that too recently idk y either

#

it was something related to networking

#

forgot what the fuck I was doing but the VPS wasn't happy about it

#

🤷

gilded sparrow
#

How can i disabe the login message

#

Last login: yesterday IP...

#

Blah blah

#

Debian GNU/Linux blah blh

#

How do i disable that

bitter salmon
#

are you talking about the message of the day?

gilded sparrow
#

When the user logs im

#

Im*

#

In**

bitter salmon
#

/etc/motd

#

check if this file has your message

gilded sparrow
#

O yeaa

#

What about last login:

#

And IP

#


AnimeIsLovelyy
Last login: Tue May 21 07:00:53 2019 from 0.0.0.0```
#

Is what it is now /:

#

😢

bitter salmon
#

the last login part is hard coded into your system

#

you would need to edit and recompile the C file

#

I do not know how to do it. look for Byte and when he is available (green light) you could try to ask him

oak shell
#

is summoned

bitter salmon
#

cool.. do you know if you must edit and compile loginrec.c to be able to remove the Last Login : timestamp from IP message when you login to debian?

oak shell
#

is that not ssh only?

bitter salmon
#

do not ask me, Im way out of my comfort zone 😄

oak shell
#

man sshd_config

     PrintLastLog
             Specifies whether sshd(8) should print the date and time of the last user login when a user logs in interactively.
             The default is yes.
#

I think it's that.

#

@gilded sparrow is this ssh login only, or local login?

gilded sparrow
#

SSH

oak shell
#

I'd personally leave it enabled, just so you see when your account was used last time. It's not a safe indicator of any tampering, but at least a bit.

#

Yeah, then you just have to write a line like this in your /etc/ssh/sshd_config:

PrintLastLog no
#

I think you need to sudo systemctl reload ssh afterwards to reload the ssh server config.

gilded sparrow
#

Ok fixed

#

Bur

#

I still have

#

Linux debian 4.9.0-8-amd64 #1 SMP Debian 4.9.144-3 (2019-02-02) x86_64

oak shell
#

I would guess that is created by any of the scripts in /etc/update-motd.d. Check which of them is responsible for it and just make it non-executable with sudo chmod -x /etc/update-motd.d/XX-WHATEVER

#

probably the 00-header script. At least that's what makes something similar on Ubuntu.

gilded sparrow
#

Update-motd.d is empth

#

Empty*

#

I Ran Nano

#

@oak shell

oak shell
#

🤷 dunno then off the top of my head

gilded sparrow
#

Rip

#

There's a 10-uname file but it's empty

worn apex
#

@gilded sparrow is there /etc/issue ?

#

(i'm not sure if that's what generates something like that but it may be worth checking)

oak shell
#

sure that 10-uname is empty? If you open it with nano and typo the file name, it will open a new file instead. Because that output line is exactly what uname would print.

gilded sparrow
#

Yes

#

Yes

#

Yes

worn apex
#

what do you see for ls -l /etc/update-motd.d

gilded sparrow
#

Idk

#

But I Fixed It

#

Thankss

#

Omfg

#

Looks Better 😍

#

By Default I Want All IPs Disabled.
Anyone Who Wants To Log Into My VPS Will Have To Ask Me To Put Their IP In A File To Grant Permission. Will This Cause Any Issues?

#

I'll Be Using IPTables.

worn apex
#

what happens if your ip address changes

gilded sparrow
#

Fack

#

Can't i allow mine to always work?

worn apex
#

there are cases where ip whitelisting makes sense, but if the primary administrator can only access the system from a residential ip address, you have to be very careful

#

can your hosting provider provide console access?

gilded sparrow
#

No

#

I have a spare vps. If i can install openvpn onto it, i'd get a locked-ip vpn right?

worn apex
#

getting a bit beyond my knowledge level

#

sorry

gilded sparrow
#

:/

oak shell
#

depends on your cloud provider if they assign the vps a static or dynamic ip

gilded sparrow
#

Static

main olive
#

idk I think this is where we go

#

Im on ubuntu

#

lets say I have a console

#

and it can connect to my laptop

#

lets say theres a connector

#

that needs to connect to my console

#

can I connect through my laptop

#

and use it like a usb bridge

#

please

gilded sparrow
#

Does anyone have a script which tells me the users that are online

#

There is one by default but i'd like to be able to see IPs of the users

#

on the vps

main olive
#

please

gilded sparrow
#

Hmm?

main olive
#

help

white solar
#

there isn't soda

#

there is ssh tho

gilded sparrow
#

I Need A IP Script

#

To Maintain My Server Well

main olive
#

Can Someone Teach Me How To Use My Laptop As A USB Bridge

white solar
#
dawn plaza
gilded sparrow
#

Hey

#

i have allowed my ip to connect to my vps using iptables, how do i now disable every other IP?

#

i don't know the IPs specifically, i just want it to check if it's in the iptables. if not, it's blocked.

vagrant fern
#

!warn @dawn plaza we don‘t do „lmgtfy“ or derivatives here. if you don‘t want to help, then don‘t

shy yokeBOT
#

:incoming_envelope: :ok_hand: warned @dawn plaza (we don‘t do „lmgtfy“ or derivatives here. if you don‘t want to help, then don‘t).

dawn plaza
#

Fair enough

gilded sparrow
#

pls help

grave jolt
#

@gilded sparrow i dont know the specifics, but you can create a table in iptables that is a list of allowed ips and then have block all as a rule at the end.
i dont recommend this at all though
you are better off using vpn or ssh or something with preshared keys/ a proper key sigining system to secure access
if your ip changes on the client side, youll lose access if you hard code what ips are allowed to conncet

#

if you set up a firewall to block all incoming connections except for vpn/ssh, you effectively are whitelisting access to local services to only people that you have given access to.

#

vpns/ssh are much much more secure than any home brew system

oak shell
#

@gilded sparrow who or w tell you all currently logged in users. last shows you a list of previous sessions.

tribal cobalt
#

It Can't See What They're Typing Or Commands They're Running?

boreal kestrel
#

You can see what commands they're running if you run ps or htop

#

(which is a good reason not to put anything secure on a command line argument)

main olive
#

Can someone tell me how to use my laptop as a USB bridge?

#

and to everyone telling me to look it up on google, please look at the results first. I looked there first, that is precicely why I am asking here now

boreal kestrel
#

What do you mean by usb bridge?

main olive
#

I want to connect 2 usbs devices together through my laptop

#

the name of a cable that does that is a usb bridge

grave jolt
#

is one of them normally a usb host in this situation? if so i imagine this is going to be a huge pain in the butt and likely not supported by the usb drivers on your laptop

#

what are the specific usb devices?

minor spear
#

how to make my python script globally accesible like git once installed can be accessed gloabally?

cold pagoda
#

There are basically three requirements:

  • executable permissions set for the script
  • a she-bang at the top indicating that it should be executed with the python interpreter
  • it needs to be in a location that's on PATH.