Sponsored Content
Full Discussion: Linux user prompt
Top Forums UNIX for Dummies Questions & Answers Linux user prompt Post 302729027 by Azi on Friday 9th of November 2012 01:04:26 AM
Old 11-09-2012
Question Linux user prompt

Hi,
I cant seem to get this right.
Lets say I have root privileges and I wanted:
a ) edit the user prompt to show "linux1234$" whenever they log-in.
also
b ) Show a message for users upon logging in.

I know a) has something to do with editing PS1. but how to only apply the change for users?

b ) I know there are or is a file that will enable me to accomplish this, but which or what are they?

I'm pretty new to this, so any help or guidance will be appreciated.

Thanks in advance...
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Prompt User for Pgm Output Destination

SCO Open Server 5 A program that I am working with outputs data to a system or printer with the traditional output > lp This output line along with some other job output formatting information is stored as a defined output within the program so that the average user scrolls the list of... (0 Replies)
Discussion started by: termite
0 Replies

2. Shell Programming and Scripting

Help with a user prompt

Hi, I am attempting to write a BASH shell script that will prompt users for responses before accomplishing some tasks. Due to the top-to-bottom nature of shell scripts, asking users questions in sequence is quite easy. However, I am interested in allowing users to go back to and re-answer... (1 Reply)
Discussion started by: msb65
1 Replies

3. UNIX for Dummies Questions & Answers

change user> to user@host> ssh prompt

Hi, I was wondering how to change the prompt for my ssh login. At the moment it is like user> while I'd like it to be as user@host> It is in the .bash_profile or .ssh ??? Thanks (2 Replies)
Discussion started by: pmasterkim
2 Replies

4. Linux

SSH user equivalency still prompt for password

Hi All, I've followed the exact same steps of how to setup and enable SSH user equivalent including the right permission, but when I "ssh" it still prompts for password. Could you help to see what I did wrong? I appreciate any helps. :confused: server1.com:/u01/oracle RAC1 > mkdir... (2 Replies)
Discussion started by: Beginer0705
2 Replies

5. AIX

Not able to create a new user through prompt and smit

Hi, I tried to create a user through smit and command and getting the error: 3004-698 Error committing changes Please suggest. Regards, Ravi Dwivedi (1 Reply)
Discussion started by: dwiravi
1 Replies

6. Shell Programming and Scripting

Prompt user for info

Please forgive this newbie question. I have a need to create a script that asks a user for information. Something like: What is the name: $NAME_TYPED_HERE Is $NAME_TYPED_HERE Correct ? YES (NO would go back to -What is the Name-) mkdir then goes on behind the scene and makes folder called... (1 Reply)
Discussion started by: crowman
1 Replies

7. Shell Programming and Scripting

how to prompt the user to enter an array in tcsh

Hello, I am writing a script that requires the user to enter a string of numbers: ex: 134 345 865 903 This command only allows for one variable to be entered: set "var" = $< and than once I got the array I want to change it to a list with each input on a different line: ... (1 Reply)
Discussion started by: smarones
1 Replies

8. Shell Programming and Scripting

Script to prompt user to enter data

Hi All I have a script that moves files from one dir to another dir based on date, but I would like to change it in a way that whoever is going to run to enter the dates in which files will be removed. This is my script: #!/bin/sh touch -mt 201302250000 /tmp/ref3 touch -mt 201302282359... (14 Replies)
Discussion started by: fretagi
14 Replies

9. Shell Programming and Scripting

User prompt for perl

perl -aF/\\t/ -lne 'BEGIN{%m=map{chomp;s/\cM|\cJ//g;$p=join("\t",(split/\t/));($p,$_)} <>;$m{"#CHROM\tINFO"}=$m{"Chr\tSegment Position"}};/SEGPOS=(\d+)/ || /\t(INFO)\t/ or next;$p=$F."\t".$1;exists $m{$p} and print join("\t",$_,$m{$p})' 12345_Marfan20_Output_Mutation_Report.txt <... (3 Replies)
Discussion started by: cmccabe
3 Replies

10. UNIX for Dummies Questions & Answers

How to prompt user to define a variable?

Hi everyone, Is it possible to define blank vaianbles and prompt user to fill them during the script execution? A very simple example: INPUT= OUTPUT= cut -f1-4 $INPUT | sed 's/hello/goodbye/g' | sort -uV > $OUTPUTThank you in advance! Best wishes (2 Replies)
Discussion started by: lsantome
2 Replies
ckuid(1)							   User Commands							  ckuid(1)

NAME
ckuid, erruid, helpuid, valuid - prompts for and validates a user ID SYNOPSIS
ckuid [-Q] [-W width] [-m] [-d default] [-h help] [-e error] [-p prompt] [ -k pid [-s signal]] /usr/sadm/bin/erruid [-W width] [-e error] /usr/sadm/bin/helpuid [-W width] [-m] [-h help] /usr/sadm/bin/valuid input DESCRIPTION
The ckuid utility prompts a user and validates the response. It defines, among other things, a prompt message whose response should be an existing user ID, text for help and error messages, and a default value (which are returned if the user responds with a <RETURN>). All messages are limited in length to 70 characters and are formatted automatically. Any white space used in the definition (including NEW- LINE) is stripped. The -W option cancels the automatic formatting. When a tilde is placed at the beginning or end of a message definition, the default text is inserted at that point, allowing both custom text and the default text to be displayed. If the prompt, help or error message is not defined, the default message (as defined under NOTES) is displayed. Three visual tool modules are linked to the ckuid command. They are erruid (which formats and displays an error message), helpuid (which formats and displays a help message), and valuid (which validates a response). These modules should be used in conjunction with FML objects. In this instance, the FML object defines the prompt. OPTIONS
The following options are supported: -d default Defines the default value as default. The default is not validated and so does not have to meet any criteria. -e error Defines the error message as error. -h help Defines the help messages as help. -k pid Specifies that process ID pid is to be sent a signal if the user chooses to abort. -m Displays a list of all logins when help is requested or when the user makes an error. -p prompt Defines the prompt message as prompt. -Q Specifies that quit will not be allowed as a valid response. -s signal Specifies that the process ID pid defined with the -k option is to be sent signal signal when quit is chosen. If no signal is specified, SIGTERM is used. -W width Specifies that prompt, help and error messages will be formatted to a line length of width. OPERANDS
The following operand is supported: input Input to be verified against /etc/passwd. EXIT STATUS
The following exit values are returned: 0 Successful execution. 1 EOF on input, or negative width on -W option, or usage error. 2 Usage error. 3 User termination (quit). ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
attributes(5) NOTES
The default prompt for ckuid is: Enter the login name of an existing user [?,q]: The default error message is: ERROR - Please enter the login name of an existing user. If the -m option is used, the default error message is: ERROR: Please enter one of the following login names: <List> The default help message is: Please enter the login name of an existing user. If the -m option is used, the default help message is: Please enter one of the following login names: <List> When the quit option is chosen (and allowed), q is returned along with the return code 3. The valuid module will not produce any output. It returns 0 for success and non-zero for failure. SunOS 5.10 14 Sep 1992 ckuid(1)
All times are GMT -4. The time now is 07:08 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy