Sponsored Content
Top Forums Shell Programming and Scripting Create user with access only to one command Post 302912138 by rbatte1 on Wednesday 6th of August 2014 07:19:21 AM
Old 08-06-2014
You could edit the user's personal profile (which on depends on the shell you assign) and trap them in a script. You could then prompt them for what they want to list and do just that, returning to your prompt. The only other option would be a quit where you would code a logout.

Does that theory meet your needs?



Robin
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Want to create new users without using "useradd" command and user Interaction.

Don't want to use useradd command to create a new user I am doing manual addition of accounts. Actually I am writing a script and I am working on RedHat7.1 system. What I am trying to do is run the script and pass all the values of the username password and group as command line parameters. Now... (2 Replies)
Discussion started by: syedifti
2 Replies

2. UNIX for Dummies Questions & Answers

create or modify user account to have same access as root

Is there a way to create or better yet modify a user account so it has the same privs as root? (6 Replies)
Discussion started by: xadamz23
6 Replies

3. UNIX for Advanced & Expert Users

Other than root user .Normal user is unable to create files

Hi all, I am using Sun Solaris 9 .In this system normal users unable to create files from the command line.I added these users in bin,adm and even root group i found them unable to create a file. (1 Reply)
Discussion started by: mallesh
1 Replies

4. Solaris

How to create a new ftp user account with limited access..?

Hi All, I'm using solaris 2.8, and I want create a new ftp user account with the following restrictions: - Have only ftp access, no telnet or rlogin - Have restricted access to its home directory example /export/home/newuser - Deny access to any other directory. Thanks for your help, ... (6 Replies)
Discussion started by: Jeremy3
6 Replies

5. Solaris

create command aliases for a user

Hi all, I am using Solaris 10 OS on X86. When I add a new user from command useradd -d /export/home/vikas -m -s /bin/bash vikas files local.cshrc, local.login, local.profile and .profile get copied to my home directory (i.e. /export/home/vikas) from /etc/skel/ Which file I have to change... (4 Replies)
Discussion started by: vikas027
4 Replies

6. Solaris

create user with RWX access to a specific directory in Solaris 10

I need to create a user account for a developer that will allow him rwx access to all resources in a directory. How can I do that? Thanks (5 Replies)
Discussion started by: gsander
5 Replies

7. Shell Programming and Scripting

To create user name with read only access

hi, how to create user name with read only access. i think first need to create group with read only access after that i need to create the user and assign it to that group. If it is correct, how to create user with read only access? (4 Replies)
Discussion started by: rsivasan
4 Replies

8. UNIX for Advanced & Expert Users

How to create user with access only to one folder through ftp?

Hi all, Can someone help me with creating user with special privilegies? I need to create user who will have access ONLY to one folder (like /etc/log/) through ftp (read only access) and which will not have any other ways to log in like telnet, ssh etc.? (5 Replies)
Discussion started by: nypreH
5 Replies

9. Homework & Coursework Questions

Create script to add user and create directory

first off let me introduce myself. My name is Eric and I am new to linux, I am taking an advanced linux administration class and we are tasked with creating a script to add new users that anyone can run, has to check for the existence of a directory. if the directory does not exist then it has... (12 Replies)
Discussion started by: pbhound
12 Replies

10. Shell Programming and Scripting

Need one line command to create and set password for new user...

Using useradd abc --password password (5 Replies)
Discussion started by: Jagruti Rml
5 Replies
ckgid(1)							   User Commands							  ckgid(1)

NAME
ckgid, errgid, helpgid, valgid - prompts for and validates a group id SYNOPSIS
ckgid [-Q] [-W width] [-m] [-d default] [-h help] [-e error] [-p prompt] [-k pid [-s signal]] /usr/sadm/bin/errgid [-W width] [-e error] /usr/sadm/bin/helpgid [-W width] [-m] [-h help] /usr/sadm/bin/valgid input DESCRIPTION
ckgid prompts a user and validates the response. It defines, among other things, a prompt message whose response should be an existing group ID, text for help and error messages, and a default value (which will be returned if the user responds with a carriage 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 will be 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) will be displayed. Three visual tool modules are linked to the ckgid command. They are errgid (which formats and displays an error message), helpgid (which formats and displays a help message), and valgid (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 groups 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/group. EXIT STATUS
The following exit values are returned: 0 Successful execution. 1 EOF on input, or negative width on -W option, or 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 ckgid is: Enter the name of an existing group [?,q]: The default error message is: ERROR: Please enter one of the following group names: [List] If the -m option of ckgid is used, a list of valid groups is displayed here. The default help message is: ERROR: Please enter one of the following group names: [List] If the -m option of ckgid is used, a list of valid groups is displayed here. When the quit option is chosen (and allowed), q is returned along with the return code 3. The valgid module will not produce any output. It returns 0 for success and non-zero for failure. SunOS 5.11 14 Sep 1992 ckgid(1)
All times are GMT -4. The time now is 06:33 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy