Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Shell Program that prompts for user Id Post 302142073 by mmg2711 on Wednesday 24th of October 2007 07:07:36 AM
Old 10-24-2007
Shell Program that prompts for user Id

Hi

I have a question that after trying tirelessly I cant solve. I'm not great wth UNIX and wonder if anyone could help. I have to create a shell program using functions that prompts for a user ID. I must then verify that the user Id corresponds to an account on the system. If a legal user Id is provided then the pathname of the user's home directory must be displayed. If a user ID that is not recognised is entered an error message must be displayed. Any possible solution would gbe greatly appreciated.

Thanks in advance!
 

10 More Discussions You Might Find Interesting

1. Solaris

pkgadd pkgask still prompts for user input

I create a succesful pkgask 'response' file: pkgask -r xyz.pkg I then attempt to use the 'response' file with pkgadd: pkgadd -nr /home/user/response -d /home/user/xyz.pkg the prompts for user input still appear. I have also tried an 'admin' file but that still prompts for user input as... (1 Reply)
Discussion started by: prkfriryce
1 Replies

2. Shell Programming and Scripting

Shell script answer prompts?

Hi, I'm writing a script that calls a function to generate a certificate. In generating this certificate, I'm asked a series of questions. I was wondering, is there a way to pre-program my script to answer these questions in the same way all the time. I saw something like EOF>> y EOF ... (4 Replies)
Discussion started by: eltinator
4 Replies

3. Shell Programming and Scripting

Shell Program that prompts for user Id

Hi I have a question that after trying tirelessly I cant solve. I'm not great wth UNIX and wonder if anyone could help. I have to create a shell program using functions that prompts for a user ID. I must then verify that the user Id corresponds to an account on the system. If a legal user Id is... (16 Replies)
Discussion started by: mmg2711
16 Replies

4. UNIX for Advanced & Expert Users

Advantage of executing program in user shell?

Hi, I'm curious about the advantage of forking and executing a program in a user shell as opposed to forking and executing the program directly without the user shell. For example: why is it often like: SSHD->fork&exec(shell, sftp-server)->fork&exec(sftp-server) And Not like: ... (2 Replies)
Discussion started by: seeker333
2 Replies

5. Shell Programming and Scripting

Help to hide shell terminal and run prompt program after ssh login for specified user

Hey guys, I have some task from my office to lock user on the specified directory after the user logged on using ssh. And then run prompt program to fill the required information. Yeah, just like an ATM system. My question: How could I do those?? AFAIK I have to edit the ~./bashrc. But the... (1 Reply)
Discussion started by: franzramadhan
1 Replies

6. Shell Programming and Scripting

script prompts the user to enter four lines.

The script prompts the user to enter four lines. (1 Reply)
Discussion started by: polineni
1 Replies

7. Shell Programming and Scripting

Bash script to start program and answer prompts?

I'm trying to write a script the simplifies the execution of a program: After starting the program (sh ~/.mfix/model/make_mfix) I am prompted four times for options: Do you need SMP version? (y/n) Do you need DMP version? (y/n) Do you need debug version? (y/n) Force re-compilation of... (2 Replies)
Discussion started by: lanew
2 Replies

8. Shell Programming and Scripting

how to run a command line with another user without prompts for password

Hi, I'm writing a script, in the script I need to use tcpdump to capture some packets however it needs root priviledge my computer is configured by school and I have no real root priviledge so I can't use sudo on my computer,like Code: sudo tcpdump ...... I have to use a limited... (1 Reply)
Discussion started by: esolve
1 Replies

9. Shell Programming and Scripting

Scrolling through text while interacting with program prompts

Hi all, I am trying write a shell script to automate the installation of a program, but during the process of the installation, the installation program requires the user to scroll through 10 pages of a license agreement. Since this is coming from stdout and is not a prompt, I am unable to send... (4 Replies)
Discussion started by: nanlee
4 Replies

10. Shell Programming and Scripting

Sqlldr call via shell script prompts error

Good morning, I'm attempting to call sqlldr via shell script and it is prompting endIf is unec #!/bin/sh cd /tmp/v_tst FILENAME_WANTED=`date +"HourlyData_%Y%m%d_%H00.txt"` echo "FILENAME_WANTED = ${FILENAME_WANTED}" LIST_OF_FILES=`ls -rt HourlyData*.txt |tail -1` LIST_OF_FILES=`basename... (4 Replies)
Discussion started by: V1l1h1
4 Replies
SSS_USERADD(8)							 SSSD Manual pages						    SSS_USERADD(8)

NAME
sss_useradd - create a new user SYNOPSIS
sss_useradd [options] LOGIN DESCRIPTION
sss_useradd creates a new user account using the values specified on the command line plus the default values from the system. OPTIONS
-u,--uid UID Set the UID of the user to the value of UID. If not given, it is chosen automatically. -c,--gecos COMMENT Any text string describing the user. Often used as the field for the user's full name. -h,--home HOME_DIR The home directory of the user account. The default is to append the LOGIN name to /home and use that as the home directory. The base that is prepended before LOGIN is tunable with "user_defaults/baseDirectory" setting in sssd.conf. -s,--shell SHELL The user's login shell. The default is currently /bin/bash. The default can be changed with "user_defaults/defaultShell" setting in sssd.conf. -G,--groups GROUPS A list of existing groups this user is also a member of. -m,--create-home Create the user's home directory if it does not exist. The files and directories contained in the skeleton directory (which can be defined with the -k option or in the config file) will be copied to the home directory. -M,--no-create-home Do not create the user's home directory. Overrides configuration settings. -k,--skel SKELDIR The skeleton directory, which contains files and directories to be copied in the user's home directory, when the home directory is created by sss_useradd. This option is only valid if the -m (or --create-home) option is specified, or creation of home directories is set to TRUE in the configuration. -Z,--selinux-user SELINUX_USER The SELinux user for the user's login. If not specified, the system default will be used. -h,--help Display help message and exit. THE LOCAL DOMAIN
In order to function correctly, a domain with "id_provider=local" must be created and the SSSD must be running. The administrator might want to use the SSSD local users instead of traditional UNIX users in cases where the group nesting (see sss_groupadd(8)) is needed. The local users are also useful for testing and development of the SSSD without having to deploy a full remote server. The sss_user* and sss_group* tools use a local LDB storage to store users and groups. SEE ALSO
sss_groupadd(8), sss_groupdel(8), sss_groupshow(8), sss_groupmod(8), sss_userdel(8), sss_usermod(8). AUTHORS
The SSSD upstream - http://fedorahosted.org/sssd SSSD
03/04/2013 SSS_USERADD(8)
All times are GMT -4. The time now is 03:36 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy