You are not logged in.

#1 2007-12-30 19:05:23

WiLLiE
Member
From: Sweden
Registered: 2005-02-27
Posts: 135

[Solved] Some problems.. (cron, sudo, mount, mpd)

Hello all, glad to be back with archlinux again :)

A few errors I encountered though that I would like some help with:

I have this script here:

$ ls /etc/cron.hourly/
totalt 4,0K
-rw-r--r-- 1 root root 34  2 dec 03.44 pacman.hourly.sh

$ cat /etc/cron.hourly/pacman.hourly.sh 
#!/bin/bash

pacman -Sy
return 0;

Cron can't run it, errors from the log:

30-Dec-2007 00:02  initgroups failed: root Operation not permittedChangeUser failed (root): /usr/sbin/run-cron /etc/cron.daily
30-Dec-2007 00:02  FILE /var/spool/cron/root USER root pid 23281 cmd /usr/sbin/run-cron /etc/cron.daily
30-Dec-2007 00:22  initgroups failed: root Operation not permittedChangeUser failed (root): /usr/sbin/run-cron /etc/cron.weekly
30-Dec-2007 00:22  FILE /var/spool/cron/root USER root pid 10195 cmd /usr/sbin/run-cron /etc/cron.weekly
30-Dec-2007 01:01  initgroups failed: root Operation not permittedChangeUser failed (root): /usr/sbin/run-cron /etc/cron.hourly
30-Dec-2007 01:01  FILE /var/spool/cron/root USER root pid 15952 cmd /usr/sbin/run-cron /etc/cron.hourly
30-Dec-2007 02:01  initgroups failed: root Operation not permittedChangeUser failed (root): /usr/sbin/run-cron /etc/cron.hourly
30-Dec-2007 02:01  FILE /var/spool/cron/root USER root pid 9428 cmd /usr/sbin/run-cron /etc/cron.hourly
30-Dec-2007 02:54  /usr/sbin/crond V3.2 dillon, started
30-Dec-2007 03:01  FILE /var/spool/cron/root USER root pid 11302 cmd /usr/sbin/run-cron /etc/cron.hourly
30-Dec-2007 04:01  FILE /var/spool/cron/root USER root pid 7751 cmd /usr/sbin/run-cron /etc/cron.hourly
30-Dec-2007 05:01  FILE /var/spool/cron/root USER root pid 16539 cmd /usr/sbin/run-cron /etc/cron.hourly
30-Dec-2007 06:01  FILE /var/spool/cron/root USER root pid 7280 cmd /usr/sbin/run-cron /etc/cron.hourly
30-Dec-2007 07:01  FILE /var/spool/cron/root USER root pid 26785 cmd /usr/sbin/run-cron /etc/cron.hourly
30-Dec-2007 08:01  FILE /var/spool/cron/root USER root pid 18862 cmd /usr/sbin/run-cron /etc/cron.hourly
30-Dec-2007 09:01  FILE /var/spool/cron/root USER root pid 6531 cmd /usr/sbin/run-cron /etc/cron.hourly

hm, apparently it's working now? Strange.

ok, problem number 2.

I like to mount my smb shares from fstab.

//Goamania.se/Muzax /mnt/Muzax smbfs credentials=/home/willie/.smbpassword,uid=1000,gid=1000,noauto 0 0

/home/willie/.smbpassword

$ ls /home/willie/.smbpassword
-rw------- 1 root root 30 26 dec 04.06 /home/willie/.smbpassword

$ sudo cat /home/willie/.smbpassword
user=someuser
password=somepass

If I sudo mount as a user I get the following error:

 $ sudo mount /mnt/Muzax
1601: session setup failed: ERRDOS - ERRnoaccess (Access denied.)
SMB connection failed

But no problem mounting as root, or unmounting as user with sudo.

/etc/sudoers:

$ sudo cat /etc/sudoers 
# sudoers file.
#
# This file MUST be edited with the 'visudo' command as root.
# Failure to use 'visudo' may result in syntax or file permission errors
# that prevent sudo from running.
#
# See the sudoers man page for the details on how to write a sudoers file.
#

# Host alias specification

# User alias specification

# Cmnd alias specification

# Defaults specification

# Runas alias specification

# User privilege specification
root    ALL=(ALL) SETENV: ALL
willie  ALL=(ALL) SETENV: ALL

# Uncomment to allow people in group wheel to run all commands
# and set environment variables.
# %wheel    ALL=(ALL) SETENV: ALL

# Same thing without a password
# %wheel    ALL=(ALL) NOPASSWD: SETENV: ALL

# Samples
# %users  ALL=/sbin/mount /cdrom,/sbin/umount /cdrom
# %users  localhost=/sbin/shutdown -h now

Oh, and a last question:
Is there someone who knows if there is a way to get mpd to play alac (apple lossless) files? Faad2 doesn't seem to support alac. :/

Last edited by WiLLiE (2008-01-03 23:21:04)

Offline

#2 2007-12-31 01:04:19

stonecrest
Member
From: Boulder
Registered: 2005-01-22
Posts: 1,190

Re: [Solved] Some problems.. (cron, sudo, mount, mpd)

WiLLiE wrote:

Oh, and a last question:
Is there someone who knows if there is a way to get mpd to play alac (apple lossless) files? Faad2 doesn't seem to support alac. hmm

http://www.musicpd.org/mantis/view.php?id=1278


I am a gated community.

Offline

#3 2007-12-31 02:33:17

WiLLiE
Member
From: Sweden
Registered: 2005-02-27
Posts: 135

Re: [Solved] Some problems.. (cron, sudo, mount, mpd)

Yeah, I've seen that one too and they don't seem interested at all.

Edit:
I just tried xmms2 (via AUR).. It has alac support, but it keeps crashing. Not stable at all.

Last edited by WiLLiE (2007-12-31 04:32:24)

Offline

#4 2007-12-31 08:09:12

byte
Member
From: Düsseldorf (DE)
Registered: 2006-05-01
Posts: 2,046

Re: [Solved] Some problems.. (cron, sudo, mount, mpd)

/usr/sbin/run-cron expects executable (+x) files in /etc/cron.*


1000

Offline

#5 2008-01-03 22:18:47

WiLLiE
Member
From: Sweden
Registered: 2005-02-27
Posts: 135

Re: [Solved] Some problems.. (cron, sudo, mount, mpd)

byte wrote:

/usr/sbin/run-cron expects executable (+x) files in /etc/cron.*

Yeah, I missed that when posting the question. Seems to work now.

Still have the sudo + mounting problem though. (I'm forced to su to root to mount)

Edit:
Solved. Me being stupid, had user= in my credentials file lol (but it is the same credentials file i've used like a year on other dists)

Last edited by WiLLiE (2008-01-03 23:19:51)

Offline

Board footer

Powered by FluxBB