Sponsored Content
Full Discussion: Help with useradd command
Top Forums Shell Programming and Scripting Help with useradd command Post 302767101 by MadeInGermany on Wednesday 6th of February 2013 07:56:17 AM
Old 02-06-2013
Generally this is a bad idea.
E.g. a graphical desktop won't work.
And, if terminal-only login suffices, giving each user the same UID (same identity) will give you a security problem one day.
 

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

useradd

I work on some hp ux 11.00 Servers. i have to add an user. i use the useradd command like follows: useradd -u 72022 -g 71095 -c " comment " -d /PACKAGE_NAME/home/username -s /usr/bin/sh username The command returns with error 3. The manpage means value number 3: Invalid argument supplied to an... (6 Replies)
Discussion started by: ortsvorsteher
6 Replies

3. UNIX for Dummies Questions & Answers

Who can help me how to add user without 'useradd' command

Can any one tell me if i dun want using 'useradd' command to add new user, it is have any command i can use to add a new user?and any extra step needed for my local environment? (3 Replies)
Discussion started by: foong
3 Replies

4. UNIX for Advanced & Expert Users

useradd

Hi. due to some needs i gave a user the premission to use useradd command with sudo. i want to know if there is a way to let him set the initial password, without giving him the premission to use passwd command as root (sudo). maybe a way to set a default password for all the new users that... (2 Replies)
Discussion started by: dorilevy
2 Replies

5. Solaris

useradd

Hi, I need to add a new user who will only be able to access one single folder on my Solaris 9 system. Can this be achieved by using just useradd or do i need to fiddle with auth_attr table? TIA, Selma (4 Replies)
Discussion started by: Selma
4 Replies

6. Shell Programming and Scripting

useradd

Gurus, I need to add a user to all the machines. I need a script to do this. I did one but it does not allow me to su to root within a ssh session i open. It exists saying su: Sorry. Please let me know how i can do it. I do not have the freedom of using sudo either. Regards (4 Replies)
Discussion started by: earlysame55
4 Replies

7. UNIX for Dummies Questions & Answers

useradd command

what if useradd ? or useradd * is given as input???? if it wont execute. then what are the values for name shud be avoided like ? * (1 Reply)
Discussion started by: Gopi Krishna P
1 Replies

8. Solaris

Purpose D option in useradd command

Hi Can any one tell about -D option in the useradd command? Thanks MaroV (3 Replies)
Discussion started by: vr_mari
3 Replies

9. Solaris

useradd

if useradd command is deleted in solaris how do we add user (3 Replies)
Discussion started by: vivek_ng
3 Replies

10. Shell Programming and Scripting

Using GID,Secondary ID in useradd command

Hi All, I am writing the script for user creation and want to use GID and Secondary group id from previous similar profile.Any one help me how we will take out GID & Secondary and use in useradd command. $ id -a test uid=6236(test) gid=999(local) groups=999(local),9003(testadmin) Above... (4 Replies)
Discussion started by: susindram
4 Replies
identity(3)						     Library Functions Manual						       identity(3)

NAME
starting_luid, starting_ruid, starting_euid, starting_rgid, starting_egid, is_starting_luid, is_starting_ruid, is_starting_euid, is_start- ing_rgid, is_starting_egid, set_auth_parameters, check_auth_parameters - Get or check user or group IDs (Enhanced Security) LIBRARY
Security Library (libsecurity.so) SYNOPSIS
#include <sys/types.h> #include <sys/security.h> #include <prot.h> uid_t starting_luid(void); uid_t starting_ruid(void); uid_t starting_euid(void); uid_t starting_rgid(void); uid_t starting_egid(void); int is_starting_luid( uid_t uid); int is_starting_ruid( uid_t uid); int is_starting_euid( uid_t uid); int is_starting_rgid( uid_t gid); int is_starting_egid( uid_t gid); void set_auth_parameters( int argc, char *argv[]); void check_auth_parameters(void); Parameters Specifies the process's user ID. Specifies the process's group ID. Specifies the argument count. DESCRIPTION
The identity functions provide a way to recall the IDs of a process at the time the program started. They are useful when interrogating the invoking environment of a program after any setuid() or setgid() calls have been made so that the original environment can be captured. The starting_luid() function returns the login UID for the process. The login UID is the immutable stamp for the process and accurately denotes the account under which the session is being run, regardless of subsequent setuid() calls. The starting_ruid() function returns the real UID for the process as it was set in the beginning of the program. Similarly, start- ing_euid() returns the effective UID, starting_rgid() returns the real GID, and starting_egid() returns the effective GID. These IDs may not be the same as those returned by getuid(), geteuid(), getgid(), or getegid(), respectively, because intervening calls to setuid() or setgid() can change them depending on the process's privileges. The is_starting_luid() function returns a value of 1 if the argument is the same as the login UID at the time when set_auth_parameters() was invoked; otherwise, it returns a value of 0 (zero). Similarly, The is_starting_ruid() function returns 1 if the argument is the same as the real UID at the time when set_auth_parameters() was invoked, and 0 otherwise. The is_starting_euid() function returns 1 if the argument is the same as the effective UID at the time when set_auth_parameters() was invoked, and 0 otherwise. The is_starting_rgid() function returns 1 if the argument is the same as the real GID at the time when set_auth_parameters() was invoked, and 0 otherwise. The is_starting_egid() function returns 1 if the argument is the same as the effective GID at the time when set_auth_parameters() was invoked, and 0 otherwise. The set_auth_parameters() function is used to retain the IDs for future lookup. It also tests the kernel to see if the security features have been loaded. If not, the program exists with an error message. It should be called first in a program or there is a chance that it will capture an environment different from the conditions at the program start. The two arguments are the argument count and vector with which the program was called. The check_auth_parameters() function verifies that set_auth_parameters() has been previously invoked. If not, the program exits. NOTES
Programs must call set_auth_parameters() before any other action in main(). The program must always call set_auth_parameters(argc,argv) before doing anything that changes argc or argv; the other functions in identity.c depend on this happening. The argc parameter must be at least 1. Programs using these functions must be compiled with -lsecurity. RELATED INFORMATION
Functions: getuid(2), getgid(2), setuid(2), setgid(2). delim off identity(3)
All times are GMT -4. The time now is 09:46 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy