Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Green Puddin
Mar 30, 2008

I'll try to stop clogging up this thread with retarded posts, but I'm so close.

Basically, here's the new smb.conf;

code:
[global]
workgroup = WORKGROUP
server string = SambaServer
security = share
name resolve order = hosts lmhosts
map to guest = Bad User

[Music]
path = /home/coleman/Music
force user = nobody
force group = nogroup
read only = yes
guest ok = yes

[Videos]
path = /home/coleman/Videos
force user = nobody
force group = nogroup
read only = yes
guest ok = yes
Now, I know this is going to sound really, really stupid - but how can I grant nobody / nogroup access to these folders while I still retain my permissions with them (as in, being able to modify them as I see fit, etc)? I really do appreciate you guys.

Adbot
ADBOT LOVES YOU

spankmeister
Jun 15, 2008






Green Puddin posted:

Now, I know this is going to sound really, really stupid - but how can I grant nobody / nogroup access to these folders while I still retain my permissions with them (as in, being able to modify them as I see fit, etc)? I really do appreciate you guys.

Well there's two ways to accomplish this, one is allowing read rights to world, and the other is using ACL's

First option:

chmod -R o+r /home/coleman/Music /home/coleman/Videos

That will keep the user and group ownership intact, but will allow anybody to read those files.

Using ACL's is something you could do but IMO only if you need to restrict read access to nobody/nogroup and/or regular unix permissions aren't sufficient.

IMHO the first option is the easiest and best solution in your situation.

Longinus00
Dec 29, 2005
Ur-Quan
Why would you want to replace the default smb.conf? Just add your own shares to it.

I mean, if nothing else there's those nice comments besides all the fields so if you ever go edit it later you know what everything does. It's not like your setup is esoteric enough that you're using anything that's not provided in the default config. Most of the file is commented out, what you're supposed to do is uncomment the stuff you need.

Longinus00 fucked around with this message at 17:57 on Oct 28, 2011

Green Puddin
Mar 30, 2008

Thanks for the try spankmeister, but that doesn't look like I could still get the files accessed on the XP computer.

Looks like I'll just have to say "gently caress it" to how I want to do this and just set up user accounts for the friends. Thanks again though.

Longinus00
Dec 29, 2005
Ur-Quan

Green Puddin posted:

Thanks for the try spankmeister, but that doesn't look like I could still get the files accessed on the XP computer.

Looks like I'll just have to say "gently caress it" to how I want to do this and just set up user accounts for the friends. Thanks again though.

Restore the smb.conf from /usr/share/samba/smb.conf

Change:
code:
#   security = user
to
code:
   security = user
Add this after that
code:
   guest account = nobody
Make shares like this
code:
[videoshare]
   comment = Video share
   path = /home/username/Videos/
   browseable = yes
   read only = yes
   guest ok = yes
   guest only = yes
Don't forget to restart samba.
code:
sudo service smbd restart

Longinus00 fucked around with this message at 19:04 on Oct 28, 2011

Poopernickel
Oct 28, 2005

electricity bad
Fun Shoe
Is it possible to bind an application to a particular network card? Like if I wanted to dedicate one particular application to running on eth1 instead of eth0?

spankmeister
Jun 15, 2008






Poopernickel posted:

Is it possible to bind an application to a particular network card? Like if I wanted to dedicate one particular application to running on eth1 instead of eth0?

depends... what app?

Poopernickel
Oct 28, 2005

electricity bad
Fun Shoe

spankmeister posted:

depends... what app?

Firefox, in my case.

I'm looking to configure a machine that is mostly firewalled behind our intranet, but has web access through our public DSL.

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!

Just installed Debian 6.0, forgot how simple and easy it was. I guess I'll play with this for a few weeks and see how it goes.

spankmeister
Jun 15, 2008






Poopernickel posted:

Firefox, in my case.

I'm looking to configure a machine that is mostly firewalled behind our intranet, but has web access through our public DSL.

Well, you might be able to route all internet traffic over the DSL, and all intranet traffic over the LAN if you set up your routes correctly (gateways and netmasks).

You could also have all HTTP traffic (port 80 and 443, mostly) go over one interface using IPTables. You might need connection tracking to get this to work reliably.

But having one application "bind" to a network interface is not possible as far as I know, unless that application is programmed to do so (like dhcpd, for example)

Crush
Jan 18, 2004
jot bought me this account, I now have to suck him off.
Sorry if this is not the best place to ask this, but I am interested in a job in Linux Server Administration. I recently got an e-mail stating the following:

quote:

The first thing we will be looking for is basic understanding of the Linux filesystem and command line interface. Our Level 1 administrators are expected to know the basic commands to run a Linux server such as lsof, awk, sed, chmod, etc. A big plus would also be to familiarize yourself with the cPanel/WHM control panel front and back end.

What would you guys consider to be other "basic" linux commands? All I can think of is echo, ls, ps, kill, killall, head, tail, iptables, useradd, passwd, chsh, touch, echo, chown, chgrp, du, and df. Are there any others that my fellow goons can think of?

Any help is greatly appreciated :)

Socket Ryanist
Aug 30, 2004

top is a big one

also get into the habit of using pkill instead of killall for that one fateful day where you are put in charge of a Solaris machine.

Longinus00
Dec 29, 2005
Ur-Quan

Crush posted:

Sorry if this is not the best place to ask this, but I am interested in a job in Linux Server Administration. I recently got an e-mail stating the following:


What would you guys consider to be other "basic" linux commands? All I can think of is echo, ls, ps, kill, killall, head, tail, iptables, useradd, passwd, chsh, touch, echo, chown, chgrp, du, and df. Are there any others that my fellow goons can think of?

Any help is greatly appreciated :)

If you want to impress you'll want to know a bit of shell scripting and perl. Knowing how the linux default filesystem is setup is also a plus (/usr /var etc.). Knowing the special directories like /proc, /dev, and /sys is also good for debugging.

Jonny 290
May 5, 2005



[ASK] me about OS/2 Warp

Crush posted:

Sorry if this is not the best place to ask this, but I am interested in a job in Linux Server Administration. I recently got an e-mail stating the following:


What would you guys consider to be other "basic" linux commands? All I can think of is echo, ls, ps, kill, killall, head, tail, iptables, useradd, passwd, chsh, touch, echo, chown, chgrp, du, and df. Are there any others that my fellow goons can think of?

Any help is greatly appreciated :)

I don't think it'd be too overkill to at least learn what every program in the Single Unix Specification does. If you have a head on your shoulders, it's then pretty much just a matter of learning your pipes and redirects and how to string poo poo together.

Crush
Jan 18, 2004
jot bought me this account, I now have to suck him off.
Thanks for all of the suggestions so far! Can't believe I forgot top.

Jonny 290 posted:

I don't think it'd be too overkill to at least learn what every program in the Single Unix Specification does. If you have a head on your shoulders, it's then pretty much just a matter of learning your pipes and redirects and how to string poo poo together.

I looked Single Unix Specification up on Wikipedia, but am not exactly clear as to what you mean. Do you mind elaborating?

dont skimp on the shrimp
Apr 23, 2008

:coffee:

Crush posted:

Sorry if this is not the best place to ask this, but I am interested in a job in Linux Server Administration. I recently got an e-mail stating the following:


What would you guys consider to be other "basic" linux commands? All I can think of is echo, ls, ps, kill, killall, head, tail, iptables, useradd, passwd, chsh, touch, echo, chown, chgrp, du, and df. Are there any others that my fellow goons can think of?

Any help is greatly appreciated :)
Eh, lsmod and modprobe (for module manipulation), pgrep (probably just good for scripting purposes, but might be nice anyway), chown and chgrp (These should be a no-brainer really and was probably covered under "etc" in your post) and id (could be nice).

fold, sort, grep and wc can be nice if you need to work with text, less or more is probably useful too. If you need to search the filesystem find can be nice if you haven't ran updatedb in a while, else mlocate (or slocate etc. depending on system) is probably the better choice.

tar and rsync might be nice if you need to do some elementary backup, and mount is probably a good idea too.

I figure you probably know most, if not all of these already, but can't hurt with a reminder. :)

As one of the above posters pointed out, some shell scripting or other kind of scripting is probably going to be very useful too I'd guess. Personally, I like bash and python, but there are probably a lot better options to go by.

Vulture Culture
Jul 14, 2003

I was never enjoying it. I only eat it for the nutrients.
If you've never used dmesg I will never hire you as anything more than an intern

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!

Poopernickel posted:

Firefox, in my case.

I'm looking to configure a machine that is mostly firewalled behind our intranet, but has web access through our public DSL.

What exactly are you trying to do? Hide your internet access or just surf through a certain IP?

nitrogen
May 21, 2004

Oh, what's a 217°C difference between friends?

spankmeister posted:

Well, you might be able to route all internet traffic over the DSL, and all intranet traffic over the LAN if you set up your routes correctly (gateways and netmasks).

You could also have all HTTP traffic (port 80 and 443, mostly) go over one interface using IPTables. You might need connection tracking to get this to work reliably.

But having one application "bind" to a network interface is not possible as far as I know, unless that application is programmed to do so (like dhcpd, for example)

What you really want to do is set up a proxy server.

spankmeister
Jun 15, 2008






nitrogen posted:

What you really want to do is set up a proxy server.

Hmmyeah didn't think of that.

Wheelchair Stunts
Dec 17, 2005
lspci can be good for troubleshooting hardware issues. I'd also delve into the procfs as that can be a treasure trove of information.

JHVH-1
Jun 28, 2002

Misogynist posted:

If you've never used dmesg I will never hire you as anything more than an intern

But sometimes 'cat /var/log/messages' has timestamps and other useful stuff!

Wheelchair Stunts
Dec 17, 2005

Crush posted:

Thanks for all of the suggestions so far! Can't believe I forgot top.


I looked Single Unix Specification up on Wikipedia, but am not exactly clear as to what you mean. Do you mind elaborating?

This looks to be the command list for version 2. Here is a link to version 4 which requires free registration (:allears:) to download.

Jonny 290
May 5, 2005



[ASK] me about OS/2 Warp
Second link's what I came back to post. I realize that Linux is rarely complaint with the SUS but it's a great baseline.

While I'm in here, I have been beating on my issue posted a couple pages back with no luck. Cliffs notes: ONLY dynamically generated pages on my Xen domU's at home are timing out when accessing from the LAN. They all work fine accessing via Internet with a NAT layer. I can ping and SSH between them, but for example SCP and other file transfers hang forever, be it domU to domU, domU to dom0, or LAN client to domU. Statically served pages are working fine. Suspecting some bizarre PHP reverse DNS or TCP/IP setting is at fault.

Jonny 290 fucked around with this message at 12:28 on Oct 30, 2011

pseudorandom name
May 6, 2007

Wheelchair Stunts posted:

This looks to be the command list for version 2. Here is a link to version 4 which requires free registration (:allears:) to download.

Version 7 is the latest.

Janitor Prime
Jan 22, 2004

PC LOAD LETTER

What da fuck does that mean

Fun Shoe
Hey guys I have a laptop with a totally hosed video card. It will boot past the BIOS and start to load windows, but then I can't do anything because I can't make out what's on the screen. I was wondering if I could maybe put it to some use but I'm not sure how I would install Linux on it if I can't make out the screen.

Longinus00
Dec 29, 2005
Ur-Quan

MEAT TREAT posted:

Hey guys I have a laptop with a totally hosed video card. It will boot past the BIOS and start to load windows, but then I can't do anything because I can't make out what's on the screen. I was wondering if I could maybe put it to some use but I'm not sure how I would install Linux on it if I can't make out the screen.

There's several ways you can tackle this problem. I'd try either creating a custom kickstart install or some PXE boot deal that bootstraps with ssh server.

ToxicFrog
Apr 26, 2008


MEAT TREAT posted:

Hey guys I have a laptop with a totally hosed video card. It will boot past the BIOS and start to load windows, but then I can't do anything because I can't make out what's on the screen. I was wondering if I could maybe put it to some use but I'm not sure how I would install Linux on it if I can't make out the screen.

Some linux distros have installers that let you conduct the install using a serial cable or, more conveniently, over the network. In a situation like this, I'd probably:
- pick a distro with a network-controllable installer
- boot that
- hosed video card means you can't read the IP off the screen, so ask your router which addresses it's handed out and figure it out that way
- connect from another computer and finish the install

And now you have a nice, compact, network-accessible linux system that you can use as a mail server or Minecraft host or something.

text editor
Jan 8, 2007
Yeah, see if you can enable Network Install/PXE in the BIOS and look up a TFTP guide for pretty much any distribution. For many you can even create an unattended install, complete with SSH keys to be loaded initially onto the system.

Vulture Culture
Jul 14, 2003

I was never enjoying it. I only eat it for the nutrients.
Same thing happens if you use an external monitor?

ToxicFrog
Apr 26, 2008


ClosedBSD posted:

Yeah, see if you can enable Network Install/PXE in the BIOS and look up a TFTP guide for pretty much any distribution.

That won't help; the problem he's having isn't loading the install image onto the system, it's controlling the installer blind once it boots. I was talking about installers that let you conduct the install over SSH after booting from USB or CD.

quote:

For many you can even create an unattended install, complete with SSH keys to be loaded initially onto the system.

That would be helpful, though.

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!

Stick the HD in a destkop or another laptop (or a caddy, and install to that) and then after you install Linux, put it back in the laptop.

text editor
Jan 8, 2007

ToxicFrog posted:

That won't help; the problem he's having isn't loading the install image onto the system, it's controlling the installer blind once it boots. I was talking about installers that let you conduct the install over SSH after booting from USB or CD.


That would be helpful, though.

I meant to combine the two of them. Things like FAI (http://fai-project.org/) allow you to network boot it and begin the installer remotely, AND deliver a text file that contains the answers he would give to the installer, assuming he was actually at the computer. It's meant for deploying large numbers of computers without even the need to have physical access to them.

Bob Morales posted:

Stick the HD in a destkop or another laptop (or a caddy, and install to that) and then after you install Linux, put it back in the laptop.


This would work just as well, with probably the same amount of extra hassle as mine did.

Pablo Bluth
Sep 7, 2007

I've made a huge mistake.
Tomorrow at work I've got to restore some old data from some DAT tapes. The tape was written before my time so I'm mostly expect it to physically fail or turn out to be written using some esoteric hardware/OS/software lost in time (this week I've already had to deal with making sense of Prime Computer, Inc's alternative ASCII table)

I've never used tapes drives before, so I've been googling some how-tos. Can somebody confirm the easiest sequence of commands to justextract every file off a given tape?

Janitor Prime
Jan 22, 2004

PC LOAD LETTER

What da fuck does that mean

Fun Shoe

Bob Morales posted:

Stick the HD in a destkop or another laptop (or a caddy, and install to that) and then after you install Linux, put it back in the laptop.

:doh: God drat it, why didn't I think of this. This is the easiest solution by far. I forget that you can do it in Linux and it won't bitch about changed hardware. :)

spankmeister
Jun 15, 2008






MEAT TREAT posted:

:doh: God drat it, why didn't I think of this. This is the easiest solution by far. I forget that you can do it in Linux and it won't bitch about changed hardware. :)

Yeah one caveat is that udev will remember the mac address for eth0 and when you boot it into another computer it will make the network card eth0.

To remediate this empty the file /etc/udev.rules.d/70-persistent-net.rules (I'm writing this from memory so the filename may be off)

Janitor Prime
Jan 22, 2004

PC LOAD LETTER

What da fuck does that mean

Fun Shoe

spankmeister posted:

Yeah one caveat is that udev will remember the mac address for eth0 and when you boot it into another computer it will make the network card eth0.

To remediate this empty the file /etc/udev.rules.d/70-persistent-net.rules (I'm writing this from memory so the filename may be off)

Thanks for the tip, she's alive!

T.K.
Dec 25, 2009

shenanigans upon 1000 equally unprecedented shenanigans
So does the old advice about not using backticks and cat if you need to loop through a file still apply?

I.e. use

while read f; do stuff with $f; done < infile.txt

instead of

for f in `cat infile.txt`; do stuff with $f; done

I find myself doing it the second way because that's how I learned it. Can it really break something in the real world?

Vulture Culture
Jul 14, 2003

I was never enjoying it. I only eat it for the nutrients.

T.K. posted:

So does the old advice about not using backticks and cat if you need to loop through a file still apply?

I.e. use

while read f; do stuff with $f; done < infile.txt

instead of

for f in `cat infile.txt`; do stuff with $f; done

I find myself doing it the second way because that's how I learned it. Can it really break something in the real world?
It's not so much that it can break anything, but that it spawns an unnecessary process and that makes a lot of Unix nerds completely sperg out. You'll see a tiny performance hit if you're reading a ton of really small files.

Adbot
ADBOT LOVES YOU

ExcessBLarg!
Sep 1, 2001

T.K. posted:

So does the old advice about not using backticks and cat if you need to loop through a file still apply?
I didn't know it was advice, but there are at least two problematic distinctions between those commands.

First, "infile.txt" is tokenized differently, particularly if "infile.txt" has spaces. The "while" variant reads entire lines at a time into f, whereas the "for" variant splits on IFS, which defaults to any whitespace. For example, suppose "infile.txt" contains:
code:
foo bar baz
quux quuux quuuux
then the command "while read f; do echo "$f"; done < infile.txt" yields:
code:
foo bar baz
quux quuux quuuux
whlie the command "for f in `cat infile.txt`; do echo "$f"; done" yields:
code:
foo
bar
baz
quux
quuux
quuux
see?

Second, in the "while" case, stdin of any command in the loop is redirected to "infile.txt", which is nasty if you try to do "while read f; do vi "$f"; done < infile.txt":
code:
Vim: Warning: Input is not from a terminal
and a lot of nasty may follow. In the "for" case, stdin is untouched (usually the terminal), and so "for f in `cat infile.txt`; do vi "$f"; done" works as expected.

Misogynist posted:

but that it spawns an unnecessary process and that makes a lot of Unix nerds completely sperg out.
Not that I disagree, but the majority of shell script commands do this. If you're even remotely sensitive to process spawning times, a shell script is not for you. So it's more of a Unix :downs: thing to complain about.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply