in csh I was using:
set prompt=""$HOSTNAME".tk.\!> "
to customize the look of my prompt. I have seen the light after reading the perils of csh scripting and wish to switch to bash. How do I customize my bash prompt??? I've tried many variation of the above w/no success, and searching this... (2 Replies)
I'm trying to use unison from bash on windows with cygwin. I don't know if this is a cygwin question, bash question or unison question. Since I always get reprimanded by the cygwin mailing list for assuming it is a cygwin problem, I'll assume it is a bash question.
The following commands work... (7 Replies)
It looks like,
user@hostname:/auto/home3/user$
Desired,
user@hostname$
I added following line in .bashrc, but still its same.
export PS1=" $ "
Please help me :confused: (13 Replies)
Hi,
Does anyone know any way of making bash prompt extended with conditional content?
Example:
export PS1="] && echo '#' || echo '\$'" # This won't work - prompt is not executed
# export PS1="\$" # This is an existing but also working equivalent
I would like to use more complex... (8 Replies)
I'm using a custom prompt with PS1 in my .profile. It is
PS1="\\u@\e\:\W\ \\$\ \"
and it works well, as you can see,
http://content.screencast.com/users/killer54291/folders/Jing/media/2b3db52a-ebf7-43e2-95cc-f45dadbc2b98/00000023.png
but, when i type more than the width of the window, it... (0 Replies)
This is an instance of "if it's not one thing, it's another."
I recently fell victim to my own stupidity in trashing, by accident, my long-running and very highly-customized .bash_profile and .bashrc files for Cygwin & Cygwin/X. I had backups from a previous "go" with this, and decided to use... (0 Replies)
I am working with a script to simplyfy some operations where I work, but one of the programs needs me to enter a password.
It will as me "Please enter the administrator password:"
Is there a way to make a bash script to automatically answer the question with the needed password?
I am looking... (3 Replies)
I remember there was a gnome only command that we could insert in a bash script to mount a Linux disk that would pop up a little window to grab a password.
I know there are bash commands to read a string but they are not GUIs and they echo the characters typed. This gnome command popped up a... (1 Reply)
Hi,
I'm trying to run a program from the bash prompt and I don't understand why it is returning with an error.
Dig is my C program, and it takes in parameters J4, detect, 3 and 0182F98E
var1="cygdrive/c/2i/test fixture/software/mccdaqtest/debug/Dig J4 detect 3 0182F98E"
when I do
... (6 Replies)
I use the .bashrc file from this thread.
Direct link to the archive containing the ultimate bashrc
I am trying to use autojump, but it will not autoload the directories to the autojump list as the custom prompt is not compatible.
Here is the thread on the issue from other users.
apt -... (2 Replies)
Discussion started by: genehunter
2 Replies
LEARN ABOUT OPENSOLARIS
pam_get_user
pam_get_user(3PAM) PAM Library Functions pam_get_user(3PAM)NAME
pam_get_user - PAM routine to retrieve user name
SYNOPSIS
cc [ flag ... ] file ... -lpam [ library ... ]
#include <security/pam_appl.h>
int pam_get_user(pam_handle_t *pamh, char **user,
const char *prompt);
DESCRIPTION
The pam_get_user() function is used by PAM service modules to retrieve the current user name from the PAM handle. If the user name has
not been set with pam_start() or pam_set_item(), the PAM conversation function will be used to prompt the user for the user name with the
string "prompt". If prompt is NULL, then pam_get_item() is called and the value of PAM_USER_PROMPT is used for prompting. If the value of
PAM_USER_PROMPT is NULL, the following default prompt is used:
Please enter user name:
After the user name is gathered by the conversation function, pam_set_item() is called to set the value of PAM_USER. By convention, appli-
cations that need to prompt for a user name should call pam_set_item() and set the value of PAM_USER_PROMPT before calling pam_authenti-
cate(). The service module's pam_sm_authenticate() function will then call pam_get_user() to prompt for the user name.
Note that certain PAM service modules, such as a smart card module, may override the value of PAM_USER_PROMPT and pass in their own
prompt. Applications that call pam_authenticate() multiple times should set the value of PAM_USER to NULL with pam_set_item() before
calling pam_authenticate(), if they want the user to be prompted for a new user name each time. The value of user retrieved by
pam_get_user() should not be modified or freed. The item will be released by pam_end().
RETURN VALUES
Upon success, pam_get_user() returns PAM_SUCCESS; otherwise it returns an error code. Refer to pam(3PAM) for information on error related
return values.
ATTRIBUTES
See attributes(5) for description of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability | Stable |
+-----------------------------+-----------------------------+
|MT-Level |MT-Safe with exceptions |
+-----------------------------+-----------------------------+
SEE ALSO pam(3PAM), pam_authenticate(3PAM), pam_end(3PAM), pam_get_item(3PAM), pam_set_item(3PAM), pam_sm(3PAM), pam_sm_authenticate(3PAM),
pam_start(3PAM), attributes(5)NOTES
The interfaces in libpam are MT-Safe only if each thread within the multithreaded application uses its own PAM handle.
SunOS 5.11 13 Oct 1998 pam_get_user(3PAM)