Sponsored Content
Full Discussion: NIS Useradd
Operating Systems Solaris NIS Useradd Post 302257000 by jlliagre on Tuesday 11th of November 2008 04:54:01 AM
Old 11-11-2008
You are missing to:
- post your question in a single thread
- provide material that would help figuring out what is wrong in your case (configuration files, error messages)
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Solaris NIS+ and RedHat NIS+

Hello all, I'm not sure if this is the right forum, but I would like to know if Redhat running NIS ( not NIS +) would have conflict with Solaris running NIS+. Currently I am running NIS+ on Solaris but will be adding RedHat to the network. I seem to be unable to find and information regarding... (2 Replies)
Discussion started by: larry
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. IP Networking

differences nis nis+

Hello together. Is there someone who is able to explain me the differences between NIS and NIS+. thanks in advance joerg (2 Replies)
Discussion started by: joerg
2 Replies

4. UNIX for Dummies Questions & Answers

NIS map mail.aliases specified, but NIS not running

Hi all, I just took over the admin role from someone and I wanna setup sendmail (just to send mail from the host) however, after I config all the resolv.conf, nssitch.conf, hosts file and when I try to send a mail out, after I punched ctl-D, it returned he following, "NIS map mail.aliases... (2 Replies)
Discussion started by: stancwong
2 Replies

5. UNIX for Advanced & Expert Users

SUSE 9 and 10 NIS clients with RedHat 8.0 NIS server not working

We have a RedHat 8.0 NIS master, with a RedHat 8.0 NIS Slave. We also have a small number of SUSE 9.1 and SUSE 10 machines here for evaluation. However, no matter what i do, the SUSE machines will not talk to the NIS Servers. If i broadcast for NIS Servers for the specified NIS domain, it... (1 Reply)
Discussion started by: fishsponge
1 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. Solaris

How to configure a NIS client bound to the NIS server in another subnet?

Hi, all. I have a Solaris client here needs to bind to NIS server in another subnet. Following is the configuration i made on the client, 1) edit /etc/inet/hosts to add an entry of the NIS server -- nserver01 2) execute `domainname` to set local NIS domain to the domain of the NIS server.... (1 Reply)
Discussion started by: sn_wukong
1 Replies

8. UNIX for Advanced & Expert Users

useradd?

Hi Experts, when using useradd command, what are the necessary options/arguments to be included? Please advice. (4 Replies)
Discussion started by: etcpasswd
4 Replies

9. Shell Programming and Scripting

Validating that the NIS and NIS+ services are disabled

I'm creating a scrip for auditing our AIX box's to ensure that they are built according to our system standards. I'm not sure on the logic for checking to see if the NIS and NIS+ services are disabled. any idea's? (2 Replies)
Discussion started by: sport
2 Replies

10. Solaris

useradd

I want to creat a 27 logins in solaris.Can anyone tell me how to write a script for that so that i create at a time for all 27 people. Thanks to guide me. (6 Replies)
Discussion started by: kkalyan
6 Replies
GETOPT(3)						   BSD Library Functions Manual 						 GETOPT(3)

NAME
getopt -- get option character from command line argument list LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <unistd.h> extern char *optarg; extern int optind; extern int optopt; extern int opterr; extern int optreset; int getopt(int argc, char * const argv[], const char *optstring); DESCRIPTION
The getopt() function incrementally parses a command line argument list argv and returns the next known option character. An option charac- ter is known if it has been specified in the string of accepted option characters, optstring. The option string optstring may contain the following elements: individual characters, and characters followed by a colon to indicate an option argument is to follow. For example, an option string "x" recognizes an option ``-x'', and an option string "x:" recognizes an option and argument ``-x argument''. It does not matter to getopt() if a following argument has leading whitespace. On return from getopt(), optarg points to an option argument, if it is anticipated, and the variable optind contains the index to the next argv argument for a subsequent call to getopt(). The variable optopt saves the last known option character returned by getopt(). The variables opterr and optind are both initialized to 1. The optind variable may be set to another value before a set of calls to getopt() in order to skip over more or less argv entries. In order to use getopt() to evaluate multiple sets of arguments, or to evaluate a single set of arguments multiple times, the variable optreset must be set to 1 before the second and each additional set of calls to getopt(), and the variable optind must be reinitialized. The getopt() function returns -1 when the argument list is exhausted. The interpretation of options in the argument list may be cancelled by the option ``--'' (double dash) which causes getopt() to signal the end of argument processing and return -1. When all options have been processed (i.e., up to the first non-option argument), getopt() returns -1. RETURN VALUES
The getopt() function returns the next known option character in optstring. If getopt() encounters a character not found in optstring or if it detects a missing option argument, it returns '?' (question mark). If optstring has a leading ':' then a missing option argument causes ':' to be returned instead of '?'. In either case, the variable optopt is set to the character that caused the error. The getopt() function returns -1 when the argument list is exhausted. EXAMPLES
extern char *optarg; extern int optind; int bflag, ch, fd; bflag = 0; while ((ch = getopt(argc, argv, "bf:")) != -1) { switch (ch) { case 'b': bflag = 1; break; case 'f': if ((fd = open(optarg, O_RDONLY, 0)) < 0) { (void)fprintf(stderr, "myname: %s: %s ", optarg, strerror(errno)); exit(1); } break; case '?': default: usage(); } } argc -= optind; argv += optind; DIAGNOSTICS
If the getopt() function encounters a character not found in the string optstring or detects a missing option argument it writes an error message to stderr and returns '?'. Setting opterr to a zero will disable these error messages. If optstring has a leading ':' then a miss- ing option argument causes a ':' to be returned in addition to suppressing any error messages. Option arguments are allowed to begin with '-'; this is reasonable but reduces the amount of error checking possible. SEE ALSO
getopt(1), getopt_long(3), getsubopt(3) STANDARDS
The optreset variable was added to make it possible to call the getopt() function multiple times. This is an extension to the IEEE Std 1003.2 (``POSIX.2'') specification. HISTORY
The getopt() function appeared in 4.3BSD. BUGS
The getopt() function was once specified to return EOF instead of -1. This was changed by IEEE Std 1003.2-1992 (``POSIX.2'') to decouple getopt() from <stdio.h>. A single dash ('-') may be specified as a character in optstring, however it should never have an argument associated with it. This allows getopt() to be used with programs that expect '-' as an option flag. This practice is wrong, and should not be used in any current develop- ment. It is provided for backward compatibility only. Care should be taken not to use '-' as the first character in optstring to avoid a semantic conflict with GNU getopt(), which assigns different meaning to an optstring that begins with a '-'. By default, a single dash causes getopt() to return -1. It is also possible to handle digits as option letters. This allows getopt() to be used with programs that expect a number (``-3'') as an option. This practice is wrong, and should not be used in any current development. It is provided for backward compatibility only. The following code fragment works in most cases. int ch; long length; char *p; while ((ch = getopt(argc, argv, "0123456789")) != -1) { switch (ch) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': p = argv[optind - 1]; if (p[0] == '-' && p[1] == ch && !p[2]) length = ch - '0'; else length = strtol(argv[optind] + 1, NULL, 10); break; } } BSD
September 10, 2003 BSD
All times are GMT -4. The time now is 07:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy