Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 01-21-2012, 09:38 AM   #1
LQ Newbie
Registered: Jan 2009
Posts: 27

Rep: Reputation: 0
Scrip issue on Debian

I have a script that is running fine on Debian squeeze on a Dockstar but has problem on a Pogoplug Pro with Debian.
The script segment is
config="`su -c 'echo $HOME' $user`/.rtorrent.rc"
and the output of it is
You are required to change your password immediately (root enforced)
su: Authentication token is no longer valid; new one required
Not sure what the issue is to cause the script not to run.
Old 01-21-2012, 11:37 AM   #2
Senior Member
Registered: Dec 2007
Location: Croatia
Distribution: Debian GNU/Linux
Posts: 1,733
Blog Entries: 5

Rep: Reputation: 127Reputation: 127
Well what I've been reading about that Pogoplug Pro, it's not so good. Here's one review;

Check /etc/shadow, and maybe if you add your user to sudo group and change your script accordingly it may help.

Read this too;
Old 01-22-2012, 03:39 AM   #3
David the H.
Bash Guru
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian sid + kde 3.5 & 4.4
Posts: 6,823

Rep: Reputation: 1960Reputation: 1960Reputation: 1960Reputation: 1960Reputation: 1960Reputation: 1960Reputation: 1960Reputation: 1960Reputation: 1960Reputation: 1960Reputation: 1960
It seems to me that there must be a better way to get the home directory of the rtorrent user than to run su and echo "$HOME". How about just parsing /etc/passwd for it?

userhome=$( awk -v usr="^$user" -F':' '($0 ~ usr) { print $(NF-1) }' /etc/passwd )
Note also that $(..) is highly recommended over `..`. And does this have to be a posix-compliant /bin/sh shell? Changing to /bin/bash would allow you to use its more advanced features as well.
Old 01-27-2012, 12:58 AM   #4
LQ Newbie
Registered: Jan 2012
Distribution: Debian / Ubuntu
Posts: 14

Rep: Reputation: 1
How about ~rtorrent/rtorrent.rc instead?


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Debian's and debian based distros issue with disk space. darkstarbyte Linux - Software 3 08-14-2010 10:58 PM
[SOLVED] Need a scrip in ubuntu karthikin Ubuntu 3 10-25-2009 03:27 PM
deleting in a .pl scrip knowram Programming 3 03-09-2007 09:51 PM
Scrip to bootsplash hraposo Debian 3 01-09-2007 06:21 PM
help with scrip tuananhbirm Linux - General 4 02-04-2005 06:30 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:35 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration