Programming :: Virtual Accounts - Changing The Prompt?
May 21, 2011
I need to write a bash script that will allow me to manage my "virtual network" (in reality just a bunch of directories and files). I need to obtain something like : I have my own command 'connect'. We can use it in two different modes: user and admin.If I type 'connect adashiu virtual_machine_name, computer will ask about password, if password is correct he will change a prompt to :
adashiu_at_virtual_machine_name >
after that user can start to use commands reserved only for user mode.Analogically with admin mode: prompt 'admin >' and administrator can only use bunch of commands reserved for him.
View 1 Replies
ADVERTISEMENT
Aug 6, 2010
I have OpenSuse 11.2 installed and I'm currently testing out Magento Commerce which is working as expected. In order to create fake customers the application requires a unique e-mail address for each customer. I currently use postfix and have all the e-mails being sent to my providers domain which i only have 2 email user accounts. How do i set up virtual e-mail addresses like joeblog@fakedomain.com and maryblog@fakedomain.com such that when the Magento Application sends emails to these addresses I would like to access the corresponding mail boxes on the same host. (i.e. the machine i run Magento on)
View 1 Replies
View Related
Mar 24, 2010
I was attempting to change the bash shell color prompt on my RHEL / CentOS 5 server. When I login as my user account on my server I can see my 'PS1':
Code:
[carlos@srv1 ~]$ echo $PS1
[u@h W]$
I want to change my PS1 to:
PS1='[e[1;32m][u@h W]$[e[0m] '
When I look in ~/.bashrc, I don't see my 'PS1' line so I am confused and wondering how I do this on RHEL / CentOS systems.
View 2 Replies
View Related
Sep 13, 2010
i have changed my monitor from crt to lcd and find the fonts to be a little out of focus,
so far i have achieved native resolution of 1280x1024 in gnome which is great! i have configured grub by adding the vga=xxx appropraite for native resolution of my monitor which is great !.........but herein lay the problem, everything is so small and stuck up in the left corner , so small that i cant read it very well.
how do i increase the font sizes at cmd prompt without changing the resolution ? dare i say ........in windows i would increase the DPI , how do i achieve this in centos ?
View 7 Replies
View Related
Oct 30, 2010
Status: openSUSE 11.3; Fujitsu Tablet ST4110.I've managed to install successfully openSUSE 11.3 on my old Fujitsu Tablet 11.3. nomodeset needs to be used at GRUB boot. Now, at the login, when I click Others, and prompted to type a username, when I clicked on the virtual keyboard at the bottom right corner of my screen, the I-beam icon looses focus from the entry box, and each character pressed on the virtual keyboard does not appear on the entry box. When I try to click on the entry box, focus cannot be returned to the entry (ie. the I-beam icon does not flash at the entry box).
View 7 Replies
View Related
Jun 9, 2011
To flesh out my *nix capability, I create new identities and give them the functionality that I liked in previous ones. I've added the "open terminal here" script, which I find invaluable. Now I want to change the prompt. This is what the terminal does right now:
ITo run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.
elliot@dan:/media/KINGSTON$
- Where do I go to shorten the prompt dramatically? I can't really think of a situation where a shorter prompt isn't better or color matters.
- How do I adios the 2 sentences that want to appear every time I open this terminal? I'm aware what sudo does.
- Instead, I would like the equivalent of a pwd command. Where would I put that?
- How do I get the output of this terminal to be simultaneously saved in a file. I do so much copying and pasting out of these terminals that I'm looking for easier ways to do it.
View 2 Replies
View Related
Feb 6, 2010
Usually I get a login prompt on Ctrl+Alt+F[1-6], but now I just see a blinking cursor in all of them, along with some boot messages in the first virtual terminal.
Code:
fsck from util-linux-ng 2.6
init: bootchart main process (462) terminated with status 2
init: bootchart post-stop process (474) terminated with status 127
/dev/sda2: clean, (integer)/(integer) files, (integer)/(integer) blocks
init: ureadahead-other main process (870) terminated with status 4
What's even weirder about this is that I uninstalled bootchart a few months ago. Whether that's related or not is beyond me, but the virtual terminals did stop working somewhere around that time. I solved this by reverting to my original /etc/network/interfaces file. Without the loopback "lo" device, the runlevel was never set, and virtual terminals never loaded.
This should be somewhere in the interfaces file:
Code:
auto lo
iface lo inet loopback
View 1 Replies
View Related
Feb 7, 2010
VMware Fusion
RHEL5 Server
After messing about with a vm I need to go into rescue mode and fix the problem I have tried all settings in the CD/DVD window and cannot get a boot prompt Just goes straight to grub I only used the rescue mode on a 'real' host before and had no problem.
View 1 Replies
View Related
Jul 12, 2010
How to change the console login prompt settings in slackware 13.1 x64? I tried googling but couldnt find anything, maybe I dont know what it's called.. I mean when the system boot and boots into console asking login info, how to reset the console to new page/clear screen(clearing all the boot up info lines) before it prompts to login. Like for example if after logged into a tty I type exit, I want the screen to refresh(reset?) such that all screen info is cleared and only login prompt is shown on the top left of the screen, like in fedora shell prompt.
View 2 Replies
View Related
Jun 3, 2011
In red hat linux server 6. I start up virtual manager and I get below error prompt:
Package required for KVM usage. The following packages are not installed
qemu-kvm
These are required to create KVM guests locally. Would you like to install them now.
I press yes but the package cannot located ...
So, I have install the qemu-kvn-0.12.1.2.113.el6_0.8.src.rpm already.
I use command rpm -ivh XXX.rpm to install.
View 1 Replies
View Related
Apr 5, 2011
How can I change the colour for each virtual console seperately?I.e. blue for console 1, green for console 2, etc. I'm using SuSE 11.4.It worked under SuSE 11.1 like a charm
View 9 Replies
View Related
Aug 17, 2010
Can we use CRON to create new user accounts?
View 4 Replies
View Related
Feb 3, 2010
Is it even remotely possible to create a bash script to login to gmail/yahoo/hotmail, thru different web browsers?
View 2 Replies
View Related
Jan 15, 2010
I installed Sun's virtual box 3.1 under Ubuntu 9.04. It worked flawlessly. I upgraded to to 9.10 and know I get a kernel error. rc=-1908 Now I cannot get Windows to load.
View 2 Replies
View Related
Feb 1, 2011
I am using Ubuntu 10.10 on a Dell Optiplex GX270, with the Intel video chip. I have a problem with my virtual consoles/terminals (<ctrl-alt>F1-F6). The default screen resolution was set to 1600x1200 at installation, which results in a nearly microscopic, unreadable font. I posted the problem on this thread on ubuntuforums.org, where they suggested adding GRUB_GFXMODE=640x480 and GRUB_GFXPAYLOAD_LINUX=640x480 to /etc/default/grub and /etc/grub.d/00_header. Still no joy--the console screen resolution still was 1600x1200.
I have noticed that the screen resolution changes three times during boot; it starts at standard VGA, 640x480, then switches to 1600x1200, then finally to 1024x768, which is my preferred resolution in X. But, if I switch to a virtual console, the resolution shoots up to 1600x1200 again. There are times when I like to use virtual terminals, and I would like to avoid eyestrain.
View 10 Replies
View Related
Apr 21, 2010
I have recently trying to build an Accounts system database for a project. When you run the program it goes in the main menu sort of like this.
Accounts System
Add a Customer With a Contract......1
Add a Customer Without a Contract...2
Display all Customers...............3
Find a Customer.....................4
Edit a Customer.....................5
Print a Statement...................6
Print an Invoice....................7
Load File...........................8
Save and Exit.......................9
When you add a customer with a contract, you add name, address, start contract, end contract, payment and email address. Now, is there a code I could write to get back to this menu. To not confuse anyone, all I just saying is supposing I accidentally push number 1 on the keyboard and suppose I didn't want to add a customer. In other words I need a code that can cancel (or stop) adding a customer to go back to the accounts system menu.
[Code]...
View 3 Replies
View Related
Jul 14, 2010
I wanna save font from SystemRescueCD's VC and set it up in Ubuntu's VC. How to save it? 'Man' doesn't make it clear to me. Is it
setfont -o [file]
or
setfont -O [file]
to save the font?
View 3 Replies
View Related
Apr 19, 2010
I'm writing a script which will log into a list of servers if they have public/private keypairs set up. If a server doesn't, I want the script to move on to the next server rather than wait at a password prompt.I'm using OpenSSH version 5.1p1 Debian-5, OpenSSL 0.9.8g 19 Oct 2007 on both client and server.I'm using this command: Code: ssh root "at" "IP" -o PasswordAuthentication=no KbdInteractiveAuthentication=no I had to write "at" instead of the symbol, as I'm not allowed to "post URLs to other sites after you have made 15 posts or more."This works for most servers, but not all (on some of them the script halts at a password prompt). I suspect those servers may run an older version of SSH which doesn't support the options I'm providing
View 3 Replies
View Related
May 15, 2011
I'm facing a problem in a - at least I though it would be - simple BASH script. I use 'awk' to find matching lines in a file, and then use while-read to modify each line matching the expr casted in awk. It looks like this:
Code:
function foo() {
awk '$NF~/^./{print $NF}' FILE.TXT|while read line; do
bla bla bla ...
[code]....
However, each time the execution hits the 'read choice' line, it doesn't prompt - as well as pause the excution - the user for a choice: it just passes it. This problem just happens inside the while loop.
View 4 Replies
View Related
Oct 30, 2010
I have an assignment that I have to change the prompt of shell through C.
View 11 Replies
View Related
Jan 8, 2011
I'm writing a Plug-gable authentication module for ssh. I am looking for prompting for some extra information after user name and password verification but before giving access to user.Actually after SSH I want to extend the same for some other services. So I am looking at some PAM module level suggestion.
I tried using conversation method with message style=PAM_PROMPT_ECO_ON but it results in PAM_CONV_ERR and conversation fails. Is it right way to interact or please suggest me If I'm doing wrong somewhere. When I use message style=PAM_PROMPT_ECO_OFF communication succeeds but message is not shown and interaction doesn't happen.
I've pased the sample code I've written at url.
Code:
#include <sys/types.h>
#include <string.h>
#include <pwd.h>
#include <grp.h>
#include <syslog.h>
code....
View 3 Replies
View Related
May 24, 2010
I want to send a message from IP to Another IP through command prompt. how can i do this.s
View 3 Replies
View Related
Jul 9, 2010
I have an a script in /etc/rc.d/init.d script that I would like to start and stop my sample application. I have named my script "foo", then I can start running my application my typing $ foo start but this does not return [OK] like other scripts do and does not return to shell prompt. My application is basically like this
int main()
{
do {
printf("Hi
");
sleep(1);
} while (1);
}
What is missing from my application that prevents from returning the shell prompt?
View 3 Replies
View Related
Feb 18, 2011
I have a requirement to execute a series of cli commands and to show the outputs. The problem is with the below script I could able to log in to cli prompt and bring CLI prompt but after that cli commands have just get printed at the cli prompt for e.g. board 2, it never gets executed and terminates the script.
FYI : I am unable to post the script as getting You are only allowed to post URLs to other sites after you have made 15 posts or more. error. I need for throwing some commands at a prompt like ftp prompt through script.
View 2 Replies
View Related
Jun 1, 2011
I've set the following as my prompt:... can't post the string due to the 15 post rule. how helpful....
Everything looks fine initially.
1- It sets the username and host in back on green text.
2- It then changes to an off-white an prints the command number for the terminal.
3- Next, it prints the working directory.
4- Finally is prints a ">" character and a space. it looks like this (hostname/un edited & image enlarged slightly to make it easier to read.)
The problem occurs when I try to "up arrow" to reuse and/or edit a prior command. It prints the prior command fine, but if I arrow over to edit the command sometimes the first character can not be deleted from displaying
I'd love to post 2 screen-shots I took to show the problem but.. 15 posts?
View 1 Replies
View Related
Feb 11, 2011
I would like to put a variable in the $PS1 prompt that will change each time a command is run. I want the color of the $PS1 prompt to change each time a command is run.I know that I can do this:
Code:
PS1="h@w # "
## "#" is changes every time a command is run
[code]....
View 9 Replies
View Related
Nov 24, 2010
I am trying to create a server on my laptop. I have a windows 7 OS. I have downloaded Apache HTTP Server, MySQL Server and PHP. My Apache seems to be working well at one point i.e., when I use the http://localhost "It Works" does show in the browser. When I attempt to sign on the MySQL Server with my password the command prompt shuts off so quick I can't even read what the window says. The MySQL server seems to be running in the task manager under mysqld.exe.
End goal: have mysql running and adn communicating with php on apache.
View 9 Replies
View Related
Sep 18, 2011
I'm new to KDE and am running KDE 4.7.1 on top of Arch Linux. It's fantastic however I have one problem - virtual desktops. Yeah I know there are those "activities" things which people say replace virtual desktops and I will look into them, but for the moment I want to stick with what I know.
And it's almost set up too. In fact, it is, apart from one issue: Say I'm on desktop 3 and I click on the desktop (as in - the bit with my wallpaper, etc, not the little square in my panel) - it immediately switches to desktop 1. Got no idea why I'd want it to do that and it's bugging me.
View 1 Replies
View Related
May 31, 2011
I have written a script to run commands on remote servers, it is working fine. But when I am running "sudo commands" on the remote servers, it asks for me password after prompting for ssh password. I am unable to automate this password prompt (which is just after ssh password prompt). This is the function I am using to provide passwords
Code:
pass ()
{
cd $DIR/"$dt1"_"$dt"
/usr/bin/perl << 'EOF'
use strict;
[code]....
I want the same function to be used , when it expects for sudo passwords for any of the below lines:
Code:
[sudo] password for vikas: orPassword: This is my "cmd" file passed in pass () function.
Code:
ssh -t -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no 192.168.1.100 "bash rcmds"
This is my script output
Quote:
[vikas@box1 ~]$ ./rscript.sh
++ rm -rf /home/vikas/May_31
++ mkdir -p /home/vikas/May_31
++ set +x
[code]....
how to automate the password prompt required for sudo commands.
View 8 Replies
View Related
Jul 30, 2011
I'm creating a bash script to do some tasks for me. I would like the script to be run at a set time of everyday. My first question is if it is possible that if one of the commands in the script requires sudo, is there a way to get around it with out making sudo not require a password. Such as, is there a way to include the password in the script? If that is the case, I can always just set the file as read only by sudo. I've been looking for a way to do this, with no success. if I have a command that wants input, how do I give it to the program. For example, if I want to make a zip file that is encrypted, the command would go as:
Code:
zip -r example * -e
now how would I get the script to insert my wanted password.
View 14 Replies
View Related