Sponsored Content
Top Forums Shell Programming and Scripting Update LDIF User info based on Test User Certs ID's Post 302437069 by infinitiguy on Wednesday 14th of July 2010 12:36:51 AM
Old 07-14-2010
how is the input file formatted? You're on the right track.. but i think your read oldval/newval statements aren't going to do much.

Are the two files formatted kind of similarly? or no?
 

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

User log in info

Hi, I am using SunOS and HP-UX. I am trying to removed user that has not been using the system for a period of time. Is there anyway to find out how long since the last time the user logged on. I know there is command "last" that read from the file /etc/wtmp that hold some of information. ... (1 Reply)
Discussion started by: vtran4270
1 Replies

2. Filesystems, Disks and Memory

? on xferring user info from one sys to another

I've been setting up a duplicate system to replace an ailing ultra 2, same os version, same file & directory structure, same databases, now I just wanted to doublecheck that for user info, to copy over exact user login info, i need to copy the etc/passwd, etc/group and etc/shadow files. THis will... (6 Replies)
Discussion started by: kymberm
6 Replies

3. UNIX for Dummies Questions & Answers

getting user info on a file

I know this is prob a simple question but anyway here goes. I want to find out the owner of a certain file. I also want to find out what permissions that owner has. Is their any command that is similair to file in that it can tell men this specfic information about a file the way file tells you... (1 Reply)
Discussion started by: Quesa
1 Replies

4. UNIX for Dummies Questions & Answers

User Info

How could I get the details about a user logged in a Unix system? ( WHat tasks did he perform or if he had changed any file or not)? Please answer my question. (1 Reply)
Discussion started by: s_dhar
1 Replies

5. 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

6. AIX

User attributes not update in user file

Hi Admins, I am running IAX 5.3 I have created a user with attributes maxage et. The user entry i can see in /etc/security/user file with only one attribute admin=false. how to update the user attributes like maxage etc. Regards Pavan (1 Reply)
Discussion started by: newaix
1 Replies

7. Linux

Could not get info for user -- wbinfo

Hi Experts, I'm not able to get the info of user's from wbinfo. But I'm able to join the user in domain(net rpc join -U username....). I have deleted the *.tdb file under /var/lib/smaba and set winbind cache time = 40 and restarted the winbind, Still it not works.. And not able to... (0 Replies)
Discussion started by: eeegopikannan
0 Replies

8. Shell Programming and Scripting

Script interacts with user , based on user input it operates

i have a script which takes input from user, if user gives either Y/y then it should continue, else it should quit by displaying user cancelled. #!/bin/sh echo " Enter your choice to continue y/Y OR n/N to quit " read A if then echo " user requested to continue " ##some commands... (7 Replies)
Discussion started by: only4satish
7 Replies

9. UNIX for Advanced & Expert Users

Sudo and edit other user's info.

i did a mistake. :( user1 ]$ vi ~/.bashrc sudo su - user2 now , whenever I try to login to user1 , it will login to user2. How can I resolve this ? :rolleyes: N.B -- I do not have root access. -- I dont know password of user2 -- this is a virtual machine. (1 Reply)
Discussion started by: linuxadmin
1 Replies
SYSCTL(2)						     Linux Programmer's Manual							 SYSCTL(2)

NAME
sysctl - read/write system parameters SYNOPSIS
#include <unistd.h> #include <linux/sysctl.h> int _sysctl(struct __sysctl_args *args); DESCRIPTION
Do not use this system call! See NOTES. The _sysctl() call reads and/or writes kernel parameters. For example, the hostname, or the maximum number of open files. The argument has the form struct __sysctl_args { int *name; /* integer vector describing variable */ int nlen; /* length of this vector */ void *oldval; /* 0 or address where to store old value */ size_t *oldlenp; /* available room for old value, overwritten by actual size of old value */ void *newval; /* 0 or address of new value */ size_t newlen; /* size of new value */ }; This call does a search in a tree structure, possibly resembling a directory tree under /proc/sys, and if the requested item is found calls some appropriate routine to read or modify the value. RETURN VALUE
Upon successful completion, _sysctl() returns 0. Otherwise, a value of -1 is returned and errno is set to indicate the error. ERRORS
EFAULT The invocation asked for the previous value by setting oldval non-NULL, but allowed zero room in oldlenp. ENOTDIR name was not found. EPERM No search permission for one of the encountered "directories", or no read permission where oldval was nonzero, or no write permis- sion where newval was nonzero. CONFORMING TO
This call is Linux-specific, and should not be used in programs intended to be portable. A sysctl() call has been present in Linux since version 1.3.57. It originated in 4.4BSD. Only Linux has the /proc/sys mirror, and the object naming schemes differ between Linux and 4.4BSD, but the declaration of the sysctl() function is the same in both. NOTES
Glibc does not provide a wrapper for this system call; call it using syscall(2). Or rather... don't call it: use of this system call has long been discouraged, and it is so unloved that it is likely to disappear in a future kernel version. Remove it from your programs now; use the /proc/sys interface instead. BUGS
The object names vary between kernel versions, making this system call worthless for applications. Not all available objects are properly documented. It is not yet possible to change operating system by writing to /proc/sys/kernel/ostype. EXAMPLE
#define _GNU_SOURCE #include <unistd.h> #include <sys/syscall.h> #include <string.h> #include <stdio.h> #include <stdlib.h> #include <linux/sysctl.h> int _sysctl(struct __sysctl_args *args ); #define OSNAMESZ 100 int main(void) { struct __sysctl_args args; char osname[OSNAMESZ]; size_t osnamelth; int name[] = { CTL_KERN, KERN_OSTYPE }; memset(&args, 0, sizeof(struct __sysctl_args)); args.name = name; args.nlen = sizeof(name)/sizeof(name[0]); args.oldval = osname; args.oldlenp = &osnamelth; osnamelth = sizeof(osname); if (syscall(SYS__sysctl, &args) == -1) { perror("_sysctl"); exit(EXIT_FAILURE); } printf("This machine is running %*s ", osnamelth, osname); exit(EXIT_SUCCESS); } SEE ALSO
proc(5) COLOPHON
This page is part of release 3.27 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. Linux 2008-11-20 SYSCTL(2)
All times are GMT -4. The time now is 02:36 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy