Path: number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.co   
   !nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!130.59   
   10.21.MISMATCH!kanaga.switch.ch!switch.ch!newsfeed-du-01.pub.2nd   
   sunrise.ch!not-for-mail   
   Newsgroups: alt.os.linux.ubuntu   
   Date: Mon, 5 Feb 2007 19:46:55 +0100   
   From: Niklaus Kuehnis    
   Subject: Re: starting a console application on first login   
   In-Reply-To: <87zm7sscl9.fsf@geemail.com>   
   Message-ID:    
   References: <87d54otu   
   p.fsf@geemail.com>   
    <87zm7sscl9.fsf@geemail.com>   
   MIME-Version: 1.0   
   Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed   
   Lines: 26   
   Organization: TDC Switzerland AG, http://www.sunrise.ch   
   NNTP-Posting-Host: 89.217.188.85   
   X-Trace: 1170701213 news.sunrise.ch 3842 89.217.188.85:2354   
   X-Complaints-To: abuse@sunrise.ch   
   Xref: number1.nntp.dca.giganews.com alt.os.linux.ubuntu:9758   
      
   On Mon, 5 Feb 2007, Hadron wrote:   
      
   > Niklaus Kuehnis writes:   
   >   
   >> Great, that works! Although I decided to do it with chmod instead of   
   >> rm. Thanks!   
   >>   
   > you mean you stop it being executable? Doesnt that result in a "no   
   > command found" or do you check the permissions before tryint to execute   
   > it from the bashrc?   
      
   Right, I'm still looking for a way to check for permissions. -    
   Actually, both ways don't work (without checking) because I don't    
   want to allow sudo for apt-get as such but only for apt-get    
   --simulate etc. nor do I want to allow sudo for a skript that is in    
   home directory and can be edited with user rights. That's why the    
   scripts are in /usr/sbin. In both cases, with the file non-executable    
   or non-existing, sudo asks for a password even though the script is    
   set to NOPASSWD in sudoers.   
      
   So the solution (i guess) is to leave the file and permissions alone    
   and only change the content of the file. .bash_profile executes the    
   apt script and empties it and cron fills it up again. Probably not    
   the most elegant way of doing it but it works.   
      
   Nik   
   --- Platinum Xpress/Win/WINServer v3.0pr5   
    * Origin: Omicron Theta BBS (1:261/20)   
|