[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)

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 (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)

Similar Messages

  • [SOLVED] Annoying problem with sudo

    I tried googling this, but finding the correct search has eluded me.
    Suddenly, sudo requires me to enter my password correctly three times (i.e. If I type correctly, I'm asked three times, if I get it wrong on the first go, it's four times and so on). This has only started in the past week.
    Any ideas how to fix it?
    TIA
    Last edited by Roken (2014-03-17 19:07:11)

    In fact, sudoers was the problem. I have no idea how (since I haven't touched it lately) but the timeout had got itself set to 363636363636363636363636363636363636363636363636363636363, which I'm guessing resolved to an immediate timeout.
    Reset and all is good again
    Thanks all

  • [SOLVED] some problems after reinstalling all packages

    Hi all,
    I had to reinstall everthing on the computer via
    pacman -S $(pacman -Qnq)
    then I move a few files back to their original place such as
    /etc/shadow and /etc/passwd
    now i'm having various problems
    1) I can't run
    systemctl
    as a normal user anymore; I have to sudo into it.  I get this error message:
    Failed to get D-Bus connection: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
    2) libreoffice wont run from my regular user account.  I get this error message:
    The application cannot be started. User installation could not be completed
    I tried uninstalling then reinstalling libreoffice.  Didn't fix it.
    Any ideas?
    Thanks
    Alan
    Last edited by beitme (2014-02-21 10:53:34)

    permissions are as follows:
    -rw------- 1 0 0 647 Oct 21 04:30 /etc/group
    -rw------- 1 0 0 614 Jan 19 17:10 /etc/shadow
    -rw------- 1 0 0 534 Oct 21 04:30 /etc/gshadow
    -rw------- 1 0 0 799 Oct 21 04:30 /etc/passwd
    contents of group are:
    root:x:0:root
    bin:x:1:root,bin,daemon
    daemon:x:2:root,bin,daemon
    sys:x:3:root,bin
    adm:x:4:root,daemon
    tty:x:5:
    disk:x:6:root,xbmc
    lp:x:7:daemon
    mem:x:8:
    kmem:x:9:
    wheel:x:10:root
    ftp:x:11:
    mail:x:12:
    uucp:x:14:
    log:x:19:root
    utmp:x:20:
    locate:x:21:
    rfkill:x:24:
    smmsp:x:25:
    http:x:33:
    games:x:50:
    lock:x:54:
    uuidd:x:68:
    dbus:x:81:
    network:x:90:xbmc
    video:x:91:xbmc
    audio:x:92:beitme,xbmc
    optical:x:93:xbmc
    floppy:x:94:
    storage:x:95:xbmc
    scanner:x:96:
    power:x:98:xbmc
    nobody:x:99:
    users:x:100:
    systemd-journal:x:190:
    ntp:x:87:
    polkitd:x:102:
    beitme:x:1000:
    lightdm:x:620:
    usbmux:x:140:
    avahi:x:84:
    transmission:x:169:
    rtkit:x:133:
    xbmc:x:1001:xbmc
    contents of passwd are:
    root:x:0:0:root:/root:/bin/bash
    bin:x:1:1:bin:/bin:/bin/false
    daemon:x:2:2:daemon:/sbin:/bin/false
    mail:x:8:12:mail:/var/spool/mail:/bin/false
    ftp:x:14:11:ftp:/srv/ftp:/bin/false
    http:x:33:33:http:/srv/http:/bin/false
    uuidd:x:68:68:uuidd:/:/sbin/nologin
    dbus:x:81:81:dbus:/:/sbin/nologin
    nobody:x:99:99:nobody:/:/bin/false
    ntp:x:87:87:Network Time Protocol:/var/lib/ntp:/bin/false
    polkitd:x:102:102:Policy Kit Daemon:/:/bin/false
    beitme:x:1000:1000::/home/beitme:/bin/bash
    lightdm:x:620:620:Light Display Manager:/var/lib/lightdm:/sbin/nologin
    usbmux:x:140:140:usbmux user:/:/sbin/nologin
    avahi:x:84:84:avahi:/:/bin/false
    transmission:x:169:169:Transmission BitTorrent Client:/var/lib/transmission:/bin/false
    rtkit:x:133:133:RealtimeKit:/proc:/sbin/nologin
    xbmc:x:1001:1001::/var/lib/xbmc:/bin/bash
    thanks

  • [SOLVED] Unable to use SUDO: issues with /etc/sudoers

    I have reinstalled Arch_64 and I have run into some problems with SUDO.
    I get the following errors when I try to use sudo:
    sudo : unable to stat /etc/sudoers : Permission Denied
    sudo : no valid sudoers sources found, quitting
    sudo : unable to initialize policy plugin
    Here's what I have done with it so far:
    * I added USERNAME (myself) to the 'wheel' group
    * I uncommented %wheel ALL=(ALL) All using visudo
    As it was not working for me I also:
    * # chown -c root:root /etc/sudoers
    * # chmod -c 0440 /etc/sudoers
    * Since that too did not work, I recommented %wheel and added USERNAME ALL=(ALL) ALL just under the line root ALL=(ALL) ALL and repeated the above steps. The above problem persists.
    * I checked with visudo -c and it says "/etc/sudoers parsed ok".
    I have been through the WIKI and the forums but still unable to figure out whats going wrong.
    I will appreciate if the forum can guide me to solution and help me resolve this issue.
    Thanks.
    Last edited by fantab (2012-11-20 09:00:56)

    Had exactly the same problem with a new Arch_64 install a few months ago, which turned out to be a problem with permissions on / (which i changed with chmod) - can't remember the details, but it was this post that put me on to a solution:
    http://archlinuxarm.org/forum/viewtopic … =20#p19727

  • [Haskell]How to read in haskell and solve simple problems

    Hello,
    I'm an experienced C/C++ programmer and I would like to use Haskell to solve some problems.
    But it is hard to me to write a simple way to read input from a file and analyze it, so I ask you how to do this. I didn't find how to do this around google or this forum, that's why I came to here.
    Suppose we are given this problem:
    "We're analyzing numbers and we want to know which numbers are even. The input consists on a number, N, and then N lines which contain a single integer. You are to say what numbers are even."
    INPUT EXAMPLE:
    3
    1234
    5555555
    123044390581349287182
    OUTPUT EXAMPLE:
    yes
    no
    yes
    I wrote the module that returns a string depending on if the number is even or not... But I would like to know how to repeat that function for N numbers. I don't want a superoptimized way or a strange way, I just want a simple and readable one...
    In C++ i would do:
    for (int i = 0; i < cases; i++)
    cin >> number;
    cout << analyze(number) << endl; // analyze returns a string
    Can you iluminate with your knowledge, archers?
    Thank you.

    Well, you said that the first line has the number N, followed by N lines. Given your description the program would always test the whole file.
    If you have a file with X lines and you'd only like to test N <= X  lines, this should do it:
    module Main where
    import System.IO
    import Control.Applicative
    main = do
    let test x = if even (read x) then "yes" else "no"
    withFile "test" ReadMode $ \handle -> do
    nlines <- read <$> hGetLine handle
    content <- hGetContents handle
    mapM_ ( putStrLn . test )
    . take nlines
    . lines
    $ content

  • TS3276 Web through this step-by-step, but alas it did not solve the problem. For some reason I can download mail on my Macbook Pro, but no my iMac. Connection Doctor shows all green lights.

    Went through this step-by-step, but alas it did not solve the problem. For some reason I can download mail on my Macbook Pro and iPhone, but no my iMac. Connection Doctor shows all green lights. This started today when I was prompted to re-enter incoming mail server passwords. I re-entered passowrds yet again to make sure they were correct. Rebuilt the inBox. Connection Doctor continues to show all green lights, but am still unable to download mail to the inbox. Has anyone else ever run into this problem?

    I have the exact same problem trying to use the Remote app on both my iPhone 3gs and iPad 2 with either my Mac or ATV2.  My Remote app used to work on my phone - I can't recall if I ever actually used it with my iPad, but when I tried today, I got all the same results as you did (on both iPad, and then iPhone).  I  was using my ATV2 to play music from iTunes on my Mac and wanted to use the Remote app, but it would not connect to either device no matter what I did. 

  • I just updated my latest java but the update is causing problems with some externale devices. So i would like to uninstall this latest java update and get back the previous one. That should solve to problems with my external device

    i just updated my latest java but the update is causing problems with some external devices. So i would like to uninstall this latest java update and get back the previous one. That should solve to problems with my external device.
    Is this possible and how do i do that?
    Anyone who responds thanks for that!
    Juko
    I am running
    Hardware Overview:
      Model Name:          Mac Pro
      Model Identifier:          MacPro1,1
      Processor Name:          Dual-Core Intel Xeon
      Processor Speed:          2,66 GHz
      Number of Processors:          2
      Total Number of Cores:          4
      L2 Cache (per Processor):          4 MB
      Memory:          6 GB
      Bus Speed:          1,33 GHz
      Boot ROM Version:          MP11.005D.B00
      SMC Version (system):          1.7f10
      Serial Number (system):          CK7XXXXXXGP
      Hardware UUID:          00000000-0000-1000-8000-0017F20F82F0
    System Software Overview:
      System Version:          Mac OS X 10.7.5 (11G63)
      Kernel Version:          Darwin 11.4.2
      Boot Volume:          Macintosh HD(2)
      Boot Mode:          Normal
      Computer Name:          Mac Pro van Juko de Vries
      User Name:          Juko de Vries (jukodevries)
      Secure Virtual Memory:          Enabled
      64-bit Kernel and Extensions:          No
      Time since boot:          11 days 20:39
    Message was edited by Host

    Java 6 you can't as Apple maintains it, and Java 7 you could if you uninstall it and Oracle provides the earlier version which they likely won't his last update fixed 37 remote exploits.
    Java broken some software here and there, all you'll have to do is wait for a update from the other parties.

  • I authorized my home sharing on my itunes for mac to share to my itunes on windows PC, but for some reason my music isn't fully sharing/syncing. Does anyone know how I can solve this problem?

    I authorized my home sharing on my itunes for mac to share to my itunes on windows PC, but for some reason my music isn't fully sharing/syncing. Does anyone know how I can solve this problem?

    Hi, Dave.
    If you're using the BlackBerry browser, you can't configure anything to bypass the RIM servers.  I believe you may do so by using the Opera browser, but I haven't tried it myself so cannot comment with authority.
    I hope that clears up the issue for you. 
    - If my response has helped you, please click "Options" beside my post and mark it as solved. Clicking the "thumbs up" icon near the bottom of my response would also be appreciated.

  • My dvd player will not let me change regions, it just quits when i do, now its stuck on region 1. Any thoughts how i can solve this problem or get round it in some way?

    My dvd player will not let me change regions, it says i have one more chance to change it, then it just quits when i do, now its stuck on region 1. Any thoughts how i can solve this problem or get round it in some way?

    Usually if you have some kind of hardware failure there is some beeping during POST or most motherboards now have LED indicators to produce and error message based on the type of failure
    So if its bad memory, not place properly, mismatched, processor not inserted properly, mismatched voltage or voltage connector not present etc it beeps or generates the error id.
    Power supplies can be tested for failure. There are some walk throughs for testing just them with a switch, paperclip or a jumper (I'd suggest not doing this if you are not familiar with the dangers of electricity).
    Memory can be tested with memory diagnostics programs like Memtest+
    Processors can overheat if the proper precautions have not been taken usually you will get a POST beep or error code for that.
    If the motherboard has no response then do the basics first:
    Check power connectors and power supply. Once you determine that is not the case move on to other items like graphics cards in all the way or memory.

  • I guess the problem come from me or I really need those contacts before he calls me for it. I'll try some method that I got from some responders on your support website. Do you have or can you recommand any software that can solve this problem?

    I guess the problem come from me but I really need those contacts before he calls me for it. I'll try some method that I got from some responders on your support website. Do you have or can you recommand any software that can solve this problem?
    One more thing. I just update my iphone that my boss gave to me but it seems to be like it giving me some trouble. My iphone was updated not too long and was successful. I try to lock into it and it telling me emergency call. I plug it to my itune and it telling me that the sim card is not valid or supported. So I inserted my sim card that I usually use to call and it still saying the same. Please help me get into it.

    And as far as paying for phone support, here are a few tips:
    If you call your carrier first and then they route you to Apple, you usually don't have to pay for phone support.
    If you are talking to Apple and they ask you to pay a support fee, ask if you can get an exception this time.  That usually works once, but they keep track of the times you've been granted such an exception.
    If you still end up paying the support fee, that fee only applies if it's not a hardware related issue.  In other words, if it can be fixed by just talking over the phone and following Apple's instructions, then the fee applies.  But if your device is deemed to have a hardware failure that caused the issue, then the fee should not apply, and you can ask for it to be waived after the fact.
    This forum is free, and almost all of the technical support articles the Apple tech advisors use are available on this website.  Literally 99% of what they can do over the phone is just walking you through the publicly available support articles.  In other words, you're paying the fee to have them do your research for you.  It's like hiring a research consultant to go look stuff up in the public library so you don't have to.  You're capable of doing it; you'd just rather pay someone to do it for you.
    It's like Starbucks.  You know how to make coffee.  Everyone knows how to make coffee.  And Starbucks coffee isn't any better than what you could make at home for far less.  But you want the convenience.  So you're really paying a convenience fee.  Milk is more expensive at 7-Eleven than it is at the grocery store... because it's a convenience store.

  • My iPhone is a iPhone 3GS. For some reason, the ringer becomes silent although I have put the ringer on full volume. Would someone kindly teach me how to solve this problem? Many thanks!!

    My iPhone is a iPhone 3GS. For some reason, the ringer becomes silent although I have put the ringer on full volume. Would someone kindly teach me how to solve this problem? Many thanks!!

    Just to make sure... you have the phone in ringer mode right? Sometimes the switch on the side gets bumped (especially if you don't have a case on the iPhone) and goes into silent. If you see a orange line on the switch - it's on silent.
    If the switch is fine (and isn't loose or anything) try restoring the iPhone in iTunes.

  • Error Message:"Cannot find or create the font 'WP-MathA'. Some characters may not display or print correctly."  Who can help me solve this problem?

    Some of the pdf files I work with (receive) come up with a comment: “Cannot find or create the font ‘WP-MathA’. Some characters may not display or print correctly.”  Who can help me solve this problem?
    Thank you in advance for  your time.
    Marlen

    Hello Anubha,
    I am having a similar problem on my machine.  I was using Word 2008 and I created a PDF inside Word.
    I am opening the file on the system itself and I am running Windows 8.1.  I am using Version 11 of Reader.
    When the PDF I created (my resume) attempts to open, it says:  cannot find or create the file Times, Bold.  Some characters may not display or print correctly. 
    However, the entire Reader keeps freezing and will not allow me to open or test print the document.  Also, it is not displaying any of the Bold Times New Roman Print.  Can you please help?  Thanks.

  • HT1414 I have broken the glass on my ipod touch. I am having trouble with some of my apps opening when I touch the screen. Can the glass be replaced? Will that solve the problem?

    I have broken the glass on my ipod touch. I am having trouble with some of my apps opening when I touch the screen. Can the glass be replaced? Will that solve the problem?

    Very likely yes.
    Apple will exchange your iPod for a refurbished one for $199 if a 64 GB 4G, $99 for the other 4G iPods and $149 for a 5G. They do not fix yours.
    Apple - iPod Repair price              
    A third-party place like the following maybe less. Google for more.
    iPhone Repair, Service & Parts: iPod Touch, iPad, MacBook Pro Screens
    Replace the screen yourself if you are up to it
    iPod Touch Repair – iFixit

  • Hello, i've win7 64bit and can use my adobe acrobat 7.0.0.2004121400. but it is not possible to print a pdf - error 20225 at the installation of acrobat. any ideas how to solve this problem? I've tryed some instructions from internet concerning this 20225

    hello, i've win7 64bit and can use my adobe acrobat 7.0.0.2004121400. but it is not possible to print a pdf - error 20225 at the installation of acrobat. any ideas how to solve this problem? I've tryed some instructions from internet concerning this 20225 error, but without success. thanks a lot and best regards

    BS heißt "Bull___****". *lol* "Betriebssystem" heißt imemr noch "operating system". GoLive wirste wohl gar nicht zum laufen kriegen. ohnehin würde man es nicht mehr verwenden, weil es noch nicht mal CSS2 voll unterstützt geschweige denn HTML 5 und andere moderne Webstandards. Wenn überhaupt, dann findeste vielleicht noch 'ne OEM CD von Strato oder 1und1 bei eBay. Die haben das damals mit jedem neuen Hostingvertrag rausgehauen. Aber wie gesagt, es ist den Aufwand nicht wert. Illustrator sollte sich durchaus installieren lassen. Eventuell einfach nochmal die Installer im Win XP Kompatibilitätsmodus laufen lassen...
    Mylenium

  • The disk cannot be partitioned because some files cannot be moved. idefrag didnt solve the problem. Please help, maybe i did something wrong

    My time Machine isnt set up so i cant back up my files.
    i read on the apple forms that idefrag works and solves that problem. I payed money, and defraged my computer and i still get that error msg!

    zuzugp wrote:
    My time Machine isnt set up so i cant back up my files.
    Well you need to resolve that backup issue first and combined we will solve your other issue.
    Get a new blank external drive either the same size or slightly larger than your boot drive and open Disk Utility in your Applications > Utilities folder.
    Select the external drive makers name on the far left and click Erase and Security option > Zero all data on the new external drive, let it complete it will take some time.
    If your on 10.7, the Erase function and select the next to the far right option, that's a Zero Erase, the 7x takes too long and isn't necessary as the Zero erase is enough to map off any failing sectors.
    Once that is finished, download the free to use (donations) Carbon Copy Cloner and clone the OS X drive (10.7 partition) to the external drive using the default settings, just select drive A and B and click clone. Wait for this also takes some time.
    Hold the option key down and select the cloen to boot from, check it out, it's a exact copy. Cool.
    i read on the apple forms that idefrag works and solves that problem. I payed money, and defraged my computer and i still get that error msg!
    You got burned, because iDefrag doesn't move data in that fashion, it only attempts to defrag files and still leaves data on the area where your trying to create the Bootcamp partition.
    Your solution is to option key boot from the clone, Zero erase the OS X partition and reverse clone back onto the drive/partition. Provided you have the drive space avaialble for Bootcamp, then all the free space will be avaialble at the bottom of the drive to create the Bootcamp partition.
    see this
    BootCamp: "This disc can not be partitioned/impossible to move files."

Maybe you are looking for