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
Adult Sword Owner
Jun 19, 2011

u deserve diploma for sublime comedy expertise
On one server, we've given one account sudoers access to ONLY restart Tomcat

username localhost=/etc/init.d/tomcat5 stop, /etc/init.d/tomcat5 start, /etc/init.d/tomcat5 restart


However, when he tries to sudo any of these commands, he gets "username is not allowed to run sudo on server. This incident will be reported"

Am I missing something?

Adbot
ADBOT LOVES YOU

Lawen
Aug 7, 2000

spankmeister posted:

Git isn't really suited for binary files, might as well just use rsync then.

You're right and I almost disclaimed it if the files are binary but for some reason just assumed he was talking about huge loving text or csv files.

For binaries I'd definitely go with one of the cloud sync options and just encrypt anything sensitive.

Saint Darwin posted:

On one server, we've given one account sudoers access to ONLY restart Tomcat

username localhost=/etc/init.d/tomcat5 stop, /etc/init.d/tomcat5 start, /etc/init.d/tomcat5 restart


However, when he tries to sudo any of these commands, he gets "username is not allowed to run sudo on server. This incident will be reported"

Am I missing something?

code:

username localhost=(ALL):/etc/init.d/yadayada

Think you're forgetting the ALL (or root or tomcat) that defines which accounts he can execute as.

Lawen fucked around with this message at 19:20 on Feb 21, 2013

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!

evol262 posted:

Exactly what about Dropbox do you think is simpler than Spideroak?

It's actually configurable where Dropbox isn't.

nitrogen
May 21, 2004

Oh, what's a 217°C difference between friends?
+1 for spideroak. Also, your content is encrypted on the servers.

Now I have a question. I'm somewhat new to Linux desktops, but have been running Linux servers for a while.

I'm using XFCE on a laptop that is usually docked to a docking station with two monitors. When I undock and use the built in display, the bottom panel is all the way toward the right, and the top panel is "panel 3", in other words, its the panel that;'s on my 2nd display when docked.

Is there any way I can set up an alternate config for when the laptop is undocked so this looks right and acts like I want?



EDIT: Tables :(

nitrogen fucked around with this message at 19:47 on Feb 21, 2013

Ninja Rope
Oct 22, 2005

Wee.
I have a desktop running Fedora 17 with XFCE and every now and then the bottom task bar panel thing decides it won't let me click on it to select windows any more. Alt+Tab works but the panel doesn't. When that starts happening it also starts blinking the window icons as if to indicate activity in a window. I haven't found a way to fix this except for restarting X. Is this just a bug or did I break something? Using xfce4-panel-4.8.6-4.fc17.x86_64.

nitrogen
May 21, 2004

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

Ninja Rope posted:

I have a desktop running Fedora 17 with XFCE and every now and then the bottom task bar panel thing decides it won't let me click on it to select windows any more. Alt+Tab works but the panel doesn't. When that starts happening it also starts blinking the window icons as if to indicate activity in a window. I haven't found a way to fix this except for restarting X. Is this just a bug or did I break something? Using xfce4-panel-4.8.6-4.fc17.x86_64.

Do you have the panel set to always be up front? (even if an app window would normally be in front)? That keeps weird crap like that from happening for me.

Fortuitous Bumble
Jan 5, 2007

I have an Arch linux install on a VM, and I broke something (long story) and had to revert to a snapshot that was from back in July 2012. Now I can't do a system update (pacman -Syu) without literally everything breaking. I either get all these "call to execv failed" messages where absolutely nothing works anymore and the system can no longer boot, which seems to be related to updating glibc, or if I tell it not to update glibc until I update everything else, I get a "/lib/libc.so.6: version GLIBC_2.17 not found" message and if I reboot a ton I can eventually update GLIBC but it does the same "call to execv" error.

Is there any decent procedure for updating from an old install that doesn't destroy my entire system? Most of the things I found online were telling people they should have updated every week or that something happened because they used the force command (I didn't do that) so I'm confused. I've never had this issue before but apparently many things changed in Arch with library symlinks or something last year so I'm guessing that's breaking everything.

Or if an 8 month old arch system is considered doomed, is there a good procedure for copying out all my installed packages and configuration files so I can start a new one?

Fortuitous Bumble fucked around with this message at 04:23 on Feb 22, 2013

pseudorandom name
May 6, 2007

ExcessBLarg! posted:

That said, gcc historically hasn't cared about link order for dynamic libraries. So if you have a libbar.so, "gcc-4.4 -o foo -lbar foo.c" works fine. However at some point since GCC 4.4, it added the single-pass ordering constraint for dynamic libraries as well, hence the need to change the order. Honestly I have no idea why, this is the first I've heard of it.

Either way, the "cc -o foo foo.c -lbar" order is pretty traditional. Does it not also work with GCC 4.4?

Default behavior in the linker was --no-as-needed, which means any time it saw a library listed on the command line, it added a DT_NEEDED entry for it in the final executable/library, even if it wasn't actually needed. The end result is that a bunch of stuff linked to a gigantic pile of libraries that they never actually used, which slowed startup times and wasted memory.

Ubuntu modified gcc to always pass --as-needed to the linker, which means you have to follow the usual single-pass link order rules for dynamic libraries.

uG
Apr 23, 2003

by Ralp
While trying to update a debian squeeze install to wheezy (via dist-upgrade), it gets to the end and complains about mdadm:
code:
Setting up sgml-base (1.26+nmu3) ...
Updating the super catalog...
Setting up xml-core (0.13+nmu2) ...
Processing triggers for initramfs-tools ...
update-initramfs: Generating /boot/initrd.img-3.2.0-4-amd64
W: mdadm: the array /dev/md/1_0 with UUID 12ae7c0a:54e1c83d:3fb6082e:e5593158
W: mdadm: is currently active, but it is not listed in mdadm.conf. if
W: mdadm: it is needed for boot, then YOUR SYSTEM IS NOW UNBOOTABLE!
W: mdadm: please inspect the output of /usr/share/mdadm/mkconf, compare
W: mdadm: it to /etc/mdadm/mdadm.conf, and make the necessary changes.
W: mdadm: the array /dev/md/3_0 with UUID 37917e46:563523cb:3fb6082e:e5593158
W: mdadm: is currently active, but it is not listed in mdadm.conf. if
W: mdadm: it is needed for boot, then YOUR SYSTEM IS NOW UNBOOTABLE!
W: mdadm: please inspect the output of /usr/share/mdadm/mkconf, compare
W: mdadm: it to /etc/mdadm/mdadm.conf, and make the necessary changes.
Processing triggers for sgml-base ...
Updating the super catalog...
root@u16324866:~#
All output: http://pastebin.com/WcnJcZDJ

Examining /etc/mdadm/mdadm.conf and /usr/share/mdadm/mkconf they aren't the same (one uses UIDs, the other uses devices) BUT they are the same as before the dist-upgrade. If I reboot at this point, the system is indeed unbootable. What should I do now?

code:
# Before boot, I assume this changes after reboot
root@u16324866:~# cat /proc/mdstat
Personalities : [raid1]
md3 : active raid1 sdb3[0] sda3[1]
      970470016 blocks [2/2] [UU]

md1 : active raid1 sda1[0] sdb1[1]
      4194240 blocks [2/2] [UU]

unused devices: <none>

Ataxerxes
Dec 2, 2011

What is a soldier but a miserable pile of eaten cats and strange language?
Thanks for recommending me the lighter version of Fedora for my laptop, it is really handy.

River
Apr 22, 2012
Nothin' but the rain
Is there any way to reinstall/fix df without having to completely reinstall the operating system?

It broke the other day, not sure at all why. It's about 12 gig under. I'm on Centos 6, kernel version is 2.6.18-308.8.2.el5.028stab101.1.

Here's the output of df -h:
code:
[root@Qtbox /]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/simfs            130G  121G  9.2G  93% /
none                  1.5G  4.0K  1.5G   1% /dev
And the true usage using du -sh:

code:
[root@Qtbox ~]# cd / && du -sh
du: cannot access `./proc/23877/task/23877/fd/4': No such file or directory
du: cannot access `./proc/23877/task/23877/fdinfo/4': No such file or directory
du: cannot access `./proc/23877/fd/4': No such file or directory
du: cannot access `./proc/23877/fdinfo/4': No such file or directory
133G    .
On the plus side, I now seem to be able to exceed my allotted hard drive space of 130gb (This is a VPS), but it breaks basically everything that uses df so I'd rather have it fixed in any case.

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!

Is running on OpenVZ? Just like everything else, when you use that, disk quotas can act goofy.

evol262
Nov 30, 2010
#!/usr/bin/perl

River posted:

Is there any way to reinstall/fix df without having to completely reinstall the operating system?

It broke the other day, not sure at all why. It's about 12 gig under. I'm on Centos 6, kernel version is 2.6.18-308.8.2.el5.028stab101.1.

Here's the output of df -h:
code:
[root@Qtbox /]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/simfs            130G  121G  9.2G  93% /
none                  1.5G  4.0K  1.5G   1% /dev
And the true usage using du -sh:

code:
[root@Qtbox ~]# cd / && du -sh
du: cannot access `./proc/23877/task/23877/fd/4': No such file or directory
du: cannot access `./proc/23877/task/23877/fdinfo/4': No such file or directory
du: cannot access `./proc/23877/fd/4': No such file or directory
du: cannot access `./proc/23877/fdinfo/4': No such file or directory
133G    .
On the plus side, I now seem to be able to exceed my allotted hard drive space of 130gb (This is a VPS), but it breaks basically everything that uses df so I'd rather have it fixed in any case.

Broken how? It looks fine. That kernel version also looks like CentOS 5.

df is a (very) simple utility that just asks the filesystem. Your 'du' reads a file that existed temporarily, some tarball in /tmp, open crap in /proc/*/fd, potentially crossed filesystem boundaries into /boot, and who knows what else. It's no more or less "true" than df. They're different tools for different purposes.

You should probably exclude /proc, /dev, /tmp, and anything else which may be in RAM, otherwise you've no hope of results lining up. Additionally, any large deleted files held open?

uG posted:


[/code]
All output: http://pastebin.com/WcnJcZDJ

Examining /etc/mdadm/mdadm.conf and /usr/share/mdadm/mkconf they aren't the same (one uses UIDs, the other uses devices) BUT they are the same as before the dist-upgrade. If I reboot at this point, the system is indeed unbootable. What should I do now?

code:
# Before boot, I assume this changes after reboot
root@u16324866:~# cat /proc/mdstat
Personalities : [raid1]
md3 : active raid1 sdb3[0] sda3[1]
      970470016 blocks [2/2] [UU]

md1 : active raid1 sda1[0] sdb1[1]
      4194240 blocks [2/2] [UU]

unused devices: <none>
mdadm --detail --scan > /etc/mdadm.conf (or /etc/mdadm/mdadm.conf, if that's really where Debian keeps it)

evol262 fucked around with this message at 23:36 on Feb 22, 2013

River
Apr 22, 2012
Nothin' but the rain
Yes it's running on OpenVZ.

evol262 posted:

Broken how? It looks fine. That kernel version also looks like CentOS 5.

df is a (very) simple utility that just asks the filesystem. Your 'du' reads a file that existed temporarily, some tarball in /tmp, open crap in /proc/*/fd, potentially crossed filesystem boundaries into /boot, and who knows what else. It's no more or less "true" than df. They're different tools for different purposes.

It's CentOS 6. Might be some OpenVZ fuckery giving me an older kernel, I'm not sure. I know that df is off because if I were to clear out everything from my personal directories (where basically all my poo poo is) it'd read something like 300kb total used - which doesn't make sense since Centos alone is a few hundred megabytes. I referred to the du spitout as 'true' because it represents basically what I'm actually using and isn't 12gb off.

How do I check if there's any large, undeleted files held open? I've rebooted several times since this happened - wouldn't they be gone by now?

Jinh
Sep 12, 2008

Fun Shoe
Are there any powerline networking solutions that work out of the box with Ubuntu? Do most already work? I'm having trouble googling any list of supported devices, and powerline networking is the only way to get a good signal in my part of the house.

Ninja Rope
Oct 22, 2005

Wee.

UglyDucklett posted:

Are there any powerline networking solutions that work out of the box with Ubuntu? Do most already work? I'm having trouble googling any list of supported devices, and powerline networking is the only way to get a good signal in my part of the house.

You could use a powerline<=>ethernet bridge and a regular old ethernet card.

Bushwack
Aug 29, 2000

Ninja Rope posted:

I have a desktop running Fedora 17 with XFCE and every now and then the bottom task bar panel thing decides it won't let me click on it to select windows any more. Alt+Tab works but the panel doesn't. When that starts happening it also starts blinking the window icons as if to indicate activity in a window. I haven't found a way to fix this except for restarting X. Is this just a bug or did I break something? Using xfce4-panel-4.8.6-4.fc17.x86_64.

I don't have a solution, but you probably don't need to restart X. Running "xfwm4 --replace" will likely resolve your issues.

Lawen
Aug 7, 2000

Was kicking around the idea of picking up a Samsung Chromebook to install Arch or CrUbuntu on but I'm having a hard time finding good info. Anyone know if 3G works? Any good sites or wikis I should read?

Ninja Rope
Oct 22, 2005

Wee.

nitrogen posted:

Do you have the panel set to always be up front? (even if an app window would normally be in front)? That keeps weird crap like that from happening for me.

I do. :(

Bushwack posted:

I don't have a solution, but you probably don't need to restart X. Running "xfwm4 --replace" will likely resolve your issues.

I'll try that if it happens again, thank you.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
It sounds like a WM or panel bug to me. Try filing a bug at the XFCE bug tracker?

Not Wolverine
Jul 1, 2007
I want to make my XFCE look more like the OS I am familiar with, windows 7. I dont care enough to go off and install a windows theme, just want similar button placement. I arranged the panel and have something similar, but is there anything similar to a 7 style dock/application switcher? Also, what about a menu similar to 7?

**edit** I discoverd DockbarX, and apparently it should work with XFCE. I am running Xubuntu 12.10. I installed dockbarx, and when I choose it from the menu it will load vertically along the left side of my screen, but that is not where I want it. I can not figure out how to add this to my panel.

edit #2 - I think the problem I am having with DockbarX and XFCE might be related to running XFCE 4.10, I really don't know yet. I just know when searching for XFCE 4.10 and DockbarX google doesn't return much of anything, but it does return a bit for XFCE 4.8 + DockbarX. So, is it possible/realistic for me to downgrade to XFCE 4.8?

Not Wolverine fucked around with this message at 19:40 on Feb 24, 2013

evol262
Nov 30, 2010
#!/usr/bin/perl

River posted:

Yes it's running on OpenVZ.


It's CentOS 6. Might be some OpenVZ fuckery giving me an older kernel, I'm not sure. I know that df is off because if I were to clear out everything from my personal directories (where basically all my poo poo is) it'd read something like 300kb total used - which doesn't make sense since Centos alone is a few hundred megabytes. I referred to the du spitout as 'true' because it represents basically what I'm actually using and isn't 12gb off.

How do I check if there's any large, undeleted files held open? I've rebooted several times since this happened - wouldn't they be gone by now?

How do you figure that it'd report a few hundred KB used if you deleted all your crap?

Try "du -sh --exclude /dev --exclude /proc --exclude /sys --exclude /tmp --exclude /var/tmp --exclude /selinux --exclude /boot *"

Shugyousha
Sep 24, 2007
Just (s)trolling by...

Fortuitous Bumble posted:

I have an Arch linux install on a VM, and I broke something (long story) and had to revert to a snapshot that was from back in July 2012. Now I can't do a system update (pacman -Syu) without literally everything breaking. I either get all these "call to execv failed" messages where absolutely nothing works anymore and the system can no longer boot, which seems to be related to updating glibc, or if I tell it not to update glibc until I update everything else, I get a "/lib/libc.so.6: version GLIBC_2.17 not found" message and if I reboot a ton I can eventually update GLIBC but it does the same "call to execv" error.

You could try to boot using an Arch live CD, mounting your root partition somewhere and then running pacman from the live CD environment specifying an install prefix and the local pacman DB for it to use (with the -r and -b flags respectively).

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

I'm using Gnome's python-wnck to get a list of windows in a python script. Works great until I try running it from cron. When I do so, I get an error message box from Ubuntu telling me about a SIGSEGV in wnck_screen_get_default().

Any way around this?

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
cron isn't run in your standard environment, which has DISPLAY and XAUTHORITY and so on.

River
Apr 22, 2012
Nothin' but the rain

evol262 posted:

How do you figure that it'd report a few hundred KB used if you deleted all your crap?

Try "du -sh --exclude /dev --exclude /proc --exclude /sys --exclude /tmp --exclude /var/tmp --exclude /selinux --exclude /boot *"

Because it has before. If I were to remove everything from my home directory (just some backups) and the stuff from my web root It'd report ~300KB used total. It did that last time I had it all cleared out.

code:
[root@Qtbox /]# du -sh --exclude /dev --exclude /proc --exclude /sys --exclude /tmp --exclude /var/tmp --exclude /selinux --exclude /boot
59G     .
And a df right after:
code:
[root@Qtbox /]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/simfs            130G   47G   84G  36% /
none                  1.5G  4.0K  1.5G   1% /dev

Goon Matchmaker
Oct 23, 2003

I play too much EVE-Online
Just a guess but it sounds like you've got some sparse files or something.

spankmeister
Jun 15, 2008






Yeah or file system compression maybe?

Try du --apparent-size

(Did I mention this already? It's 4AM, we just had a major outage on our storage platform, my brain is toast. I'd better go to bed instead of post on SA.)

River
Apr 22, 2012
Nothin' but the rain
^^ Same result. I might just bite the bullet, backup everything and reinstall if I can't find a way to fix my scripts. I'd use du or something but it's a pain.

Twlight
Feb 18, 2005

I brag about getting free drinks from my boss to make myself feel superior
Fun Shoe

River posted:

^^ Same result. I might just bite the bullet, backup everything and reinstall if I can't find a way to fix my scripts. I'd use du or something but it's a pain.

Just for a lark, try doing this:

tune2fs -l </this/partition/>

look for "Reserved Block Count"

Many file systems will reserve space so that a normal user cannot fill the root partition to 100%, causing some issues. I just had to deal with finding some extra space that was "hidden" and found it with this. Not that reserving some emergency space isn't a good idea. But it might help solve the mystery.

Goon Matchmaker
Oct 23, 2003

I play too much EVE-Online
Why does transparent NFS failover have to be so loving hard?

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

Suspicious Dish posted:

cron isn't run in your standard environment, which has DISPLAY and XAUTHORITY and so on.

Thanks, just what I needed to know.

Another question...

Is there a good way of finding out how long a user has been idle? I want to run a python script from cron only while a user is using the computer. Ideally whatever method won't require a screensaver to be configured.

Adult Sword Owner
Jun 19, 2011

u deserve diploma for sublime comedy expertise

Thermopyle posted:

Thanks, just what I needed to know.

Another question...

Is there a good way of finding out how long a user has been idle? I want to run a python script from cron only while a user is using the computer. Ideally whatever method won't require a screensaver to be configured.

Besides w?


edit: w is probably a terrible solution for your problem, sorry.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
The standard way to measure idle time is using the completely undocumented IDLETIME XSync counter. Because I'm feeling generous today, here's a simple example program: http://magcius.mecheye.net/random/xalarm.c

Compile it using the line on the top, and then run:

  $ ./xalarm 2000

or so on to wait for 2000 milliseconds of idle time. You can use this to loop with bash. It doesn't actively use any resources -- it simply waits in poll for the event to come from the X server.

Vulture Culture
Jul 14, 2003

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

Goon Matchmaker posted:

Why does transparent NFS failover have to be so loving hard?
Because NFS is simultaneously stateful and stateless and the protocol is a loving disaster

Goon Matchmaker
Oct 23, 2003

I play too much EVE-Online

Misogynist posted:

Because NFS is simultaneously stateful and stateless and the protocol is a loving disaster

No poo poo. I gave up and just installed glusterfs and set it up for replication. Seems to be working a hell of a lot better.

evol262
Nov 30, 2010
#!/usr/bin/perl

Thermopyle posted:

Thanks, just what I needed to know.

Another question...

Is there a good way of finding out how long a user has been idle? I want to run a python script from cron only while a user is using the computer. Ideally whatever method won't require a screensaver to be configured.

What environment are you assuming? D-bus can show you idle time, but it's not always the most reliable/desirable solution.

Stealthgerbil
Dec 16, 2004


I think I hosed up big time setting up a linux server. Nothing is supposed to be run under the root account right?

Well...
http://pastebin.com/Mbrr98mN

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!

BAM! Got hit in the face by a small partition.

/tmp was being used my MySQL, which is it's own partition and only 2GB

Some huge query ran, filled the temp directory and fuxored the server for about 10 minutes. Ugh.

Adbot
ADBOT LOVES YOU

spankmeister
Jun 15, 2008






Stealthgerbil posted:

I think I hosed up big time setting up a linux server. Nothing is supposed to be run under the root account right?

Well...
http://pastebin.com/Mbrr98mN

Nope, looks pretty normal to me.

e: I'd like to suggest PHP-FPM as php process manager, it's much, much more robust.

spankmeister fucked around with this message at 22:46 on Feb 26, 2013

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