Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Poll

Do you like Linux? (As an actual, usable OS, not just in concept/principle.)

Of course, I love Linux! Why would I use anything else?
- 9 (10%)
Yeah, Linux's nice. Windows (or Mac OS) still has its uses though.
- 46 (51.1%)
Linux... Meh... Tried it, what's the big deal?
- 7 (7.8%)
Linux? Wuzzat?
- 3 (3.3%)
Bleh. I could use it if I had to I guess...
- 9 (10%)
Linux? Screw that. I'm sticking with Windows/Mac OS!
- 16 (17.8%)

Total Members Voted: 90


Pages: 1 2 3 [4] 5 6 7

Author Topic: Linux  (Read 11282 times)

Sir Pseudonymous

  • Bay Watcher
    • View Profile
Re: Linux
« Reply #45 on: October 28, 2010, 09:01:27 am »

The only thing that occurs to me would be to run the script with the privileges to start with, using 'sudo [scriptname]' or something? But sudo still requires a password, it just doesn't require using a root shell account, though I believe it puts you in de facto root mode for a few minutes... It's been too long since I worked with a bash shell to remember more clearly.
Logged
I'm all for eating the heart of your enemies to gain their courage though.

Mephisto

  • Bay Watcher
    • View Profile
Re: Linux
« Reply #46 on: October 28, 2010, 09:31:18 am »

You can set up passwordless sudo. I've never done it - seems a bit contrary to sudo's whole purpose.
Logged

Sir Finkus

  • Bay Watcher
    • View Profile
Re: Linux
« Reply #47 on: October 28, 2010, 01:18:11 pm »

You can set up passwordless sudo. I've never done it - seems a bit contrary to sudo's whole purpose.

I very rarely need root permission anyway, so typing in a password once or twice a day isn't really all that much of a pita.

SolarShado

  • Bay Watcher
  • Psi-Blade => Your Back
    • View Profile
Re: Linux
« Reply #48 on: October 28, 2010, 02:15:13 pm »

Anyone know how I can run a command with root permissions without giving a password (eg, in a script)? I hear it has to do with sudo or something.

As Mephisto mentioned, you can configure password-less sudo. Read up on it (man sudo, etc.) for the details, but you can set it up that certain users/groups can run certain commands without passwords. It's quite flexible, but the syntax it a bit cryptic.

On my laptop, I've set it so that my (non-root) account can run mount, reboot, and poweroff without needing a password. Then I added an alias in my bashrc so I don't even need to type "sudo". There may have been as easier way to accomplish it, but it works. I'll copy-paste that line of my config later if I remember.

You could run the script setuid... but that can be a security risk depending on what the script does.
Logged
Avid (rabid?) Linux user. Preferred flavor: Arch

PenguinOverlord

  • Bay Watcher
    • View Profile
Re: Linux
« Reply #49 on: October 28, 2010, 02:28:33 pm »

Linux is cool, brah, but the long load-up times and the fact that I can't play my games killed it for me.
Logged
CleverBot: It hurts when you laugh at me.

ILikePie

  • Bay Watcher
  • Call me Ron
    • View Profile
Re: Linux
« Reply #50 on: October 28, 2010, 03:00:31 pm »

Anyone know how I can run a command with root permissions without giving a password (eg, in a script)? I hear it has to do with sudo or something.

As Mephisto mentioned, you can configure password-less sudo. Read up on it (man sudo, etc.) for the details, but you can set it up that certain users/groups can run certain commands without passwords. It's quite flexible, but the syntax it a bit cryptic.

On my laptop, I've set it so that my (non-root) account can run mount, reboot, and poweroff without needing a password. Then I added an alias in my bashrc so I don't even need to type "sudo". There may have been as easier way to accomplish it, but it works. I'll copy-paste that line of my config later if I remember.

You could run the script setuid... but that can be a security risk depending on what the script does.
I just want to conky to be able to read my package manager's log, which requires root access. I'll mess around with my sudoers file and see what I can get.
Logged

Dasleah

  • Bay Watcher
    • View Profile
Re: Linux
« Reply #51 on: October 28, 2010, 03:48:29 pm »

Linux is cool, brah, but the long load-up times and the fact that I can't play my games killed it for me.

I'm using Ubuntu 10.04 on a 6 year old Dell laptop and my boot times (from power on to Google) are something like 20 - 30 seconds, which isn't OMG LIGHTNING, but it sure beats my Win7 desktop.
Logged
Pokethulhu Orange: UPDATE 25
The Roguelike Development Megathread.

As well, all the posts i've seen you make are flame posts, barely if at all constructive.

ILikePie

  • Bay Watcher
  • Call me Ron
    • View Profile
Re: Linux
« Reply #52 on: October 28, 2010, 03:54:03 pm »

You can get your kernel to boot in under ten seconds, it's amazing. I've got a kernel that boots in about ten, and that's because it takes a while to decompress lzma. Starting the various daemons and whatnot takes another 10, but it's still much faster than my windows machine.
Logged

SolarShado

  • Bay Watcher
  • Psi-Blade => Your Back
    • View Profile
Re: Linux
« Reply #53 on: October 28, 2010, 04:15:07 pm »

I just want to conky to be able to read my package manager's log, which requires root access. I'll mess around with my sudoers file and see what I can get.

hmm...

check if your system has a "log" group (grep log /etc/groups), if so add your user account to it.
if the log's owning group is "log" and the group has read permission that should work, and be easier than hacking sudoers.

as promised:
Code: (excerpt from my sudoers) [Select]
solarshado  ALL=(ALL) ALL
%users ASUS-ARCH= (root) NOPASSWD: /sbin/poweroff,/sbin/reboot,/bin/mount
line 1: select user named "solarshado", logged in from ALL (any) machines, as any user, allow ALL commands
line 2: group "users", logged in from "ASUS-ARCH" (my hostname), do as "root", with no password, these commands...

Linux is cool, brah, but the long load-up times and the fact that I can't play my games killed it for me.
what distro were you using and on what hardware? xubuntu's pretty lightweight, and i'm sure there are others.
My Arch install's very fast, but it take some work to get a usable everyday-use system.
Logged
Avid (rabid?) Linux user. Preferred flavor: Arch

GlyphGryph

  • Bay Watcher
    • View Profile
Re: Linux
« Reply #54 on: October 29, 2010, 07:51:19 pm »

I'm not sure if I've ever met a linux with a long boot up load time. :/
Logged

Mephisto

  • Bay Watcher
    • View Profile
Re: Linux
« Reply #55 on: October 29, 2010, 07:56:47 pm »

I have. It wasn't Linux's fault - it was like that with Windows, too.

My ex-computer had some serious trouble and would take ten minutes to POST. It's dead now and I've parted out anything useful.
Logged

The Overseer

  • Bay Watcher
  • You saw... NOTHING!
    • View Profile
Re: Linux
« Reply #56 on: October 30, 2010, 04:12:15 pm »

Linux is good for the soul.

currently loving the crap out of Ubuntu, but I've been using linux primarily since the turn of the century, both at home and at work.
Logged

ILikePie

  • Bay Watcher
  • Call me Ron
    • View Profile
Re: Linux
« Reply #57 on: October 30, 2010, 04:35:47 pm »

I remember when I was first introduced to Linux. A few years ago, Dad gave me cd with dyne:bolic, which was a live cd distro of some kind. It had a few neat games, wesnoth, freeciv, nethack, and a few more. I played the heck out of them all, it was really cool. I decided to try it again as desktop OS last summer.
Logged

ein

  • Bay Watcher
  • 勝利の女神はここよ~ 早く捕まえてぇ~
    • View Profile
Re: Linux
« Reply #58 on: October 31, 2010, 04:36:27 pm »

  Booting 'Arch Linux'

root   (hd0,0)
 Filesystem type is ext2fs, partition type 0x83
kernel /vmlinuz26 root=/dev/disk/by-uuid/DC9C-CF89 ro
   [Linux-bzImage, setup=0x3200, size=0x1f9180]
initrd /kernel26.img

Error 15: File not found

Press any key to continue..._


Why!? D:

SolarShado

  • Bay Watcher
  • Psi-Blade => Your Back
    • View Profile
Re: Linux
« Reply #59 on: October 31, 2010, 09:15:30 pm »

  Booting 'Arch Linux'

root   (hd0,0)
 Filesystem type is ext2fs, partition type 0x83
kernel /vmlinuz26 root=/dev/disk/by-uuid/DC9C-CF89 ro
   [Linux-bzImage, setup=0x3200, size=0x1f9180]
initrd /kernel26.img

Error 15: File not found

Press any key to continue..._


Why!? D:

make sure your boot partition really is hd0,0; grub names disks/partitions a bit differently than linux (i forget exactly how)
looks from the file names like you've got a boot partition, if this isn't how you set your partitions up, add "/boot" in front of "/vmlinuz26" and "/kernel26.img"
of course, you'll have to do this all from a live environment, while you're there make sure the files are actually there and named as such

I'm guessing you shortened the uuid when you typed it here
Logged
Avid (rabid?) Linux user. Preferred flavor: Arch
Pages: 1 2 3 [4] 5 6 7