What's wrong with this syntax? It's part of my 'if' statement but it doesn't seem to pass and it keeps going to the 'else' part.
I thought it says that userid must start with a non-numeric character and is between 6 and 10 characters long (alphanumeric).
$userid|grep -Eq '^?\{6,10\}+$'
if... (2 Replies)
Hi I am trying to write a script to check the log files for the trancactions based on usr input date and user input user id.
I will take the user input userid and user input date and check there are any creation deletion happened, if so mail it other wise say no transactions;
I got user... (2 Replies)
Hi All!
My db2 is started in the AIX /etc/inittab on systemreboot as follows
db3:2:once:su - db2inst3 -c db2start >/dev/console 2>1
I changed the .profile of db2inst3 to put an alias to the db2start command as follows
alias db2start="/usr/bin/ksh /home/db2inst3/sample/db2start.ksh"
When... (1 Reply)
I would like to know the difference between the real user-id and the
effective user-id. If user-A runs a program owned by user-B then
which is the real user-id and which is the effective user-id ? (1 Reply)
Hello,
does anyone know how to increment a userid(number) written in any scripting language that works on a shell?
For example:
I have a HTML file in this format:
userid:
name:
telephone:
Every time I execute my script it adds the same fields, except with the userid incremented. Like... (2 Replies)
Discussion started by: dejavu88
2 Replies
6. Post Here to Contact Site Administrators and Moderators
Hi All,
I got this userid apache with the same userid and groupid and /sbin/nologin and the /www/a home folder is empty.
Can I just delete this userid? How can I investigate if userid have something to do with the application?
Thanks for any comment you may add. (1 Reply)
Hi all.
Quick question.
How can I tell if someone is logging in to our unix servers with an application id and not their personal id?
Thanks (2 Replies)
questions:
a. where can I customized the password of userid in solaris? say I wanted 10digits long, all caps?
thanks (4 Replies)
Discussion started by: lhareigh890
4 Replies
LEARN ABOUT OSX
pthread_setugid_np
PTHREAD_SETUGID_NP(2) BSD System Calls Manual PTHREAD_SETUGID_NP(2)NAME
pthread_setugid_np -- Set the per-thread userid and single groupid.
SYNOPSIS
#include <sys/types.h>
#include <sys/unistd.h>
int
pthread_setugid_np(uid_t uid, gid_t gid);
DESCRIPTION
pthread_setugid_np() changes the current thread's effective, real, and saved userid and groupid to the requested userid and groupid ( uid and
gid , respectively) and clears all other groupids.
uid can be the current real userid, KAUTH_UID_NONE, or, if the caller is privileged, any userid. gid can be the current real groupid or, if
the caller is priviledged, any single groupid.
Setting uid to KAUTH_UID_NONE means to "revert to the per process credential".
CAVEATS
Temporarily restoring root privileges for a non-privileged process is only possible on a per-process basis and not a per-thread basis.
pthread_setugid_np() is not intended as a privilege escalation mechanism.
Do not use pthread_setugid_np.2() in a security sensitive situation.
RETURN VALUES
Upon successful completion, a value of 0 is returned. Otherwise, -1 is returned and the global variable errno is set to indicate the error.
ERRORS
pthread_setugid_np() fails if one or more of the following are true:
[EPERM] The calling process does not have the correct credentials to set the override identity (i.e. The current credentials do
not imply "super-user").
[EPERM] If uid is set to KAUTH_UID_NONE, the current thread must already be assuming another identity in order to revert back.
[EPERM] The current thread cannot already be assuming another identity.
SEE ALSO setuid(2)setgid(2)seteuid(2)setegid(2)BSD October 1, 2008 BSD