General :: How Can Interactive Login Environment Be Duplicated In Cron
May 24, 2010
My execution environment is Linux steamboy 2.6.31-21-generic-pae #59-Ubuntu SMP.If I log in and run a program, the program works properly. The program is a shell script, which executes an environment file, so that path and library settings point correctly.If I have cron run the same program as the same user who logged in, one of the libraries cannot be found. I have sourced .bashrc and the same environment setting file, even though .bashrc executes the same environment file . /home/amr/bin/informix_env.sh
View 1 Replies
ADVERTISEMENT
Apr 16, 2010
I am trying to assign a user account on RHEL5 Server a non-interactive login but I am not sure if this is the correct command: useradd useraccount -s /sbin/nologinAfter I issue this command, I try to log in with this account and it says the "Administrator has disabled this account" when I enter the password. Does any one know if the command above is correct?
View 2 Replies
View Related
Feb 18, 2010
so i have a few shell scripts that execute wonderfully when i type them at the command line but they fail when they are run from cron.
for example, if i run a script from command line that contains
Code:
shopt -s nullglob
to prevent problems with for f in *.mp4 type loops, it works fine from terminal command line but when called from cron, it gives an error->
Code:
/home/centralsqwall/Videos/videochecker.sh: 91: shopt: not found
a couple other random errors as well...
so there is some difference in the shell from cron and the terminal?
i'm running ubuntu 9.10, #!/bin/bash
what are the commands i should be using to echo my environment or simulate cron environment from the terminal?
View 3 Replies
View Related
Jul 12, 2010
I need to run a script when i login for first time in a day. I may reboot or shutdown and then power on during the day. But i do not want the job to run during those power ups. It should run only once per day.
View 3 Replies
View Related
Jan 26, 2011
I need to run a script that prompts the user for some input and takes action based on that input. It must run at the end of the login process, after the desktop is displayed.I tried putting it in ~/.bash_login, but it didn't run. Do I need to tell /etc/profile to run ~/.bash_login? I thought it looked for it & ran it if it was found.
A related question would be - Can I make it so the terminal session that is running the script be the only thing that the user can do? In other words, they can't click on anything on the desktop or in the panels and have it run until after they respond to the input request.
View 1 Replies
View Related
Apr 22, 2010
I am having trouble distinguishing between login and interactive shells as they relate to terminals. I understand that a login shell is what is started when you login, and an interactive shell is used by scripts and such. I also get that terminals will use an interactive shell by default. What I don't understand is why interactive shells have no prompt by default. Is their a way to get an interactive shell to inherit the normal PS1 prompt? Is it considered bad to do this? Would it be better to have terminals start login shells, and if so why or why not?
View 7 Replies
View Related
Jun 2, 2010
Before you say you shouldn't do that bla bla bla. I know why i shouldn't.
However i have a problem with running sudo commands from a non interactive command line script run using plink.
The automated script needs to use chown and give the current user ownership of some files and folders created by another user.
I can't use things like sudo -s etc as it requires that i enter a password.
I have setup public key authorization in order to login. Do i have to give the root user a password and log in as that. I would prefer not doing this but if that is the only solution i guess i'll have too.
View 4 Replies
View Related
Mar 16, 2010
I just build a couple production SLES 11 machines and I'm using an ssh client to connect. However the ssh client forces me to use keyboard interactive login. How can I turn this off so I can use the normal username / password?
View 1 Replies
View Related
Feb 18, 2011
Intuitively I think that the Login Shell and the Interactive Shell are the same applications but have access to different environmental variables.It this true? Why is there more than one type of shell anyways? You can change users with the interactive shell, why not log on with it to?
View 10 Replies
View Related
Apr 22, 2011
I would like to run an interactive python script in tty1 on startup. This script requires user input outputs relevant data.I also need this script to be run as root as it accesses USB devices (and has to detach kernel drivers).It is an infinite-loop script, so I also want to be able to ctrl+alt+F to tty2 to actually login if needed
View 1 Replies
View Related
Mar 16, 2010
I am making a backup on an ntfs disk, mounted with:
using the following command:
Running this (or rather the shell script containing it) from the command line is OK, but if I run it as a cron job, I get thousands of messages:
(without line breaks, actually).
These files are all ordinary files made under Windows; the above should read "offici�le stukken", and from the command line it does, but not in cron.
I guess I need to set an environment variable, but which one?
View 1 Replies
View Related
Mar 18, 2010
Script programming question for the experts. I have written a bash script that works fine if I execute from the shell interactively. However, once I schedule it to be executed via cron, it just wouldn't work. I believe this has to do with cron running in a different environment than the one I am in when I putty in.
The bash shell script does refer to environment variables in the .cshrc file. I guess these aren't available to the cron? How can I load them into the script if I want them to be available to the cron locally within the script?
View 1 Replies
View Related
Mar 18, 2010
I'm looking for a way to set arbitrary environment variables for my graphical login on linux. I am not talking about starting a terminal and exporting environment variables within the terminal, because those variables only exist within that one terminal. I want to know how to set an environment variable that will apply to all programs started in my graphical session.
In other words, what's the Xorg equivalent of ~/.bash_login?
View 2 Replies
View Related
Mar 3, 2010
In this article about Sun, the author talks about how using a Sun network meant that you could log onto any computer on a network and all of your personal tools and settings would be there. Is it possible to set up something like that with a Windows network? How about Linux?
View 2 Replies
View Related
Apr 28, 2010
I'm using Ubuntu 9.10 (karmic). And, my ~/.pam_environment looks like the following.
PATH DEFAULT=${PATH}:~/Adobe/Reader9/bin:~/texlive/2009/bin/x86_64-linux
GIT_EDITOR DEFAULT=vim
MANPATH DEFAULT=${MANPATH}:~/texlive/2009/texmf/doc/man
INFOPATH DEFAULT=${INFOPATH}:~/texlive/2009/texmf/doc/info
But, echo $PATH returns me duplicated entries as the following.
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:~/Adobe/Reader9/bin:~/texlive/2009/bin/x86_64-linux:~/Adobe/Reader9/bin:~/texlive/2009/bin/x86_64-linux
I've tried replacing DEFAULT by OVERRIDE in my ~/.pam_environment file. But, that didn't help.
View 1 Replies
View Related
Jul 30, 2009
I have couple hard drives from different linux distro's. on the hdd's are logical volumes created. what i want to do is to backup the data from those hdd's. but when I connect some of them and boot up the system it
gives me an error that there are volume group duplicated and it list the UUID. My host system is centos 5. What is the best solution to rename those volume groups or to mount the drives from other systems, so the data will not get lost?
View 2 Replies
View Related
Feb 4, 2011
I have a situation where I am in a non-interactive shell. I have tried from within my non-interative shell to spawn an interactive shell but my output still does not goto me. Isn't there a way I can somehow go into /proc or somwhere and make the output my /dev/tty1? Or some way else to remedy this?The situation arises because I drop from my restricted shell environment (a sort of CLI interface), into the actual Linux shell. I cannot change the code of the CLI environment I am just faced with being in the linux shell environment and its non-interactive. Its very annoying to have to put > /dev/tty1 after every command I type.
Not to mention it seems damn near impossible to get pagers like more and less to work properly when your in a non-interactive shell.
View 2 Replies
View Related
Mar 19, 2011
My ubuntu 10.10 desktop environment freezes at right after login, with the window prompt to "unlock keyring" in the foreground. The cursor still can be moved around the screen with the touchpad or mouse. Mouseover of Docky elicits the usual animation but there is no response to clicking it. There is no other response elicited from moving the mouse over or clicking anything else on the screen, including the taskbar and the hot corners i have set up. However the screen still goes dim and to sleep when left unattended and can be reawoken. The netbook also still recognises when it is plugged into a power source.
Background info: I have been dual booting windows 7 starter and ubuntu 10.10 desktop edition for about 2 months now on my ASUS eeepc1005pe netbook with no issues till now. The problem only started when i booted up into windows 7 starter without having shut down ubuntu completely. My netbook was hibernating when i mistakenly chose to boot into win 7 starter at the bootloader. Now this freeze happens every single time i try to boot into ubuntu. But i am still able to boot into win 7 starter without any problems.
The same sequence of events occurs each time i try to start ubuntu. The boot goes fine, then the automatic login occurs, then compiz loads fine then my desktop environment appears with all the same windows and programs open on the desktop as the last time i had managed to use ubuntu except that the keyring login prompt appears in the foreground and then everything freezes as i have described.
View 6 Replies
View Related
Apr 6, 2011
I have my work PC in the office, and time to time I access it via TeamViewer from home. I have access to it also via ssh, over the VPN connection. I have problems with this setup, when for some reason the work PC must be rebooted (or it just happened by itself - power failure). The Ubuntu gets to the login screen and that's it. I can not access it remotely because the TeamViewer application is not started on that PC yet. I'd like to know, if there is a way how I can access my work PC over the VPN connection - open SSH session, and write some commands, to log in that desktop environment user, and launch the TeamViewer application. Ie, if someone would be looking on the screen at that moment, she would see that login screen disappears, desktop environment is loaded, and the TeamViewer app is started.
If that's not possible, then, I guess, I'll have resort to some alternative remote access tool (ie, VNC) what could be loaded before the Ubuntu login screen is shown. Then I could access it over the VPN connection, using appropriate client.
View 1 Replies
View Related
Jan 29, 2011
I just installed Ubuntu 10.10 and when I try to log in to the regular desktop environment, only the backsplash coloring is there. I can, however log into safe mode and see the GUI there. Occasionally, I will get the treat of using the regular desktop environment, but it will ultimately freeze, and if I go to a different runlevel and restart gdm, the same thing happens....only backsplash. Here's what I've looked into, all of which has failed by the way: gdm.conf, URL... even though that "fix" was for an earlier release, and of course reinstalling a few times. *Sigh*I'm running it on a Toshiba Satellite L25-S1217, Intel Celeron, 874MB RAM, and 60GB HD with the stock Radeon graphics card.
View 14 Replies
View Related
Aug 11, 2010
Is there a non-interactive way to change a user's passwd short of using expect? I'm using Debian.If not, then I guess I need to get this expect script working:
Code:
#!/usr/local/bin/expect -f
set username $env(UNAME)
[code]...
View 2 Replies
View Related
Aug 15, 2011
I have installed ubuntu 10.10(gnome desktop environment),in my laptop..everythin was workin well for the past two months...recently,i added kde plasma desktop environment,via ubuntu software centre..now,when i try to log into ubuntu,there is an error message stating "gnome power manager have not been installed correctly.please contact your system administrator",on the topmost right edge of the screen...i tried various commands like,
But,nothing has solved my problem..many suggested that it may be due to low drive space..but i cant use the mv commands too..really,i'm so helpless and its been three days,after usin my laptop..
View 1 Replies
View Related
Mar 24, 2011
how can I make my sh interactive by default. That I don't have to always type --interactive everytime I log in. I want it to be always interactive. #2- how also do I turn of --posix mode parmanently ? Is there a line I need to drop somewhere or what do i do.
View 4 Replies
View Related
Nov 24, 2010
how to to setup a PXE boot environment. The server contains a LUbuntu 10.10-installation the client is Ubuntu 10.10 Server (I didn't mix up those two...) So, everything is going fine; the client gets an ip-adres, and boots over PXE. The login-prompt is shown. Problem: I can't login. It seems my users are deleted (better not copied). Of course the system (client) works fine when I boot the system from it's harddrive. The only thing I can guess, there going something wrong with:
[Code]....
View 1 Replies
View Related
Sep 6, 2010
Possible Duplicate:Forward SSH traffic through a middle machine.I am looking to get an interactive ssh session on a remote machine, but must login via a gateway.For example, right now I do the following:
@local % ssh <user>@<gateway>
@gateway % ssh <user>@<remote>
Is it possible to achieve the same thing in a single command from my local machine? I have tried:
@local % ssh <user>@<gateway> 'ssh <user>@<remote>`
From the output i am indeed able to login, but do not get an interactive session. I took inspiration for this attempt from using ssh to run a command remotely.
View 1 Replies
View Related
Jun 14, 2011
In interactive mode (in Octave, gnuplot, R, etc.) I occasionally press Control + z by mistake. This pauses the program and kicks me back to the terminal.Is it possible to re-enter the original interactive mode (with all the stored variables)?
To reproduce:
~> octave
octave:1> a = [1:10];
octave:2> ^Z
[code].....
How can I recover my session with the variable a defined?
View 2 Replies
View Related
Feb 12, 2010
How can I disable the interactive boot up process? Also what is the pros and cons to doing this? Will this affect my being able to get to runlevel 1?
I have been googling it but not really clear on the pros/cons etc.
I am talking about a server class machine that is in a locked room, not a desktop.
I know it can be turned off in /etc/sysconfig/init # Set to anything other than 'no' to allow hotkey interactive startup... PROMPT=yes
View 4 Replies
View Related
Aug 27, 2010
I have just installed Fedora (13) for the first time. It's great ! So thanks to all its developers !
I managed to do many tweaks I wanted to, in no small part thanks to this forum, but here's one that eludes me and my google-fu.
I'd like to customize the login screen (if I grokked correctly, that's gdm). I already saw how to change the background or how to enable automatic login, but what I'd like to do is this :
1. Disable that rather annoying "pong" sound when I select a user,
2. Set a default desktop environment. Gnome seems to be the default environment selected in the drop-down menu, but me, I'd like for it to be XFCE.
View 13 Replies
View Related
Aug 24, 2010
I wish to prevent some programs from "phoning home", and to allow other programs to access only specific web servers.Is there any way to interactively allow or decline outbound communication from individual programs on Ubuntu?
View 4 Replies
View Related
Sep 28, 2010
I wanna delete a directory with its files and I wanna do that as follows: rm -r dirToDelete Unfortunately, I always get asked for EACH single file if I wanna delete this because it is write protected.... Is there a way to suppress this feedback message so that just the whole directory with its contents disappears?
View 5 Replies
View Related