Sorry for such a dreadful title, but I'm not sure how to be more descriptive. I'm hoping some of the more gurutastic out there can take a look at a solution I came up with to a problem, and advice if there are better ways to have gone about it.
To make a long story short around 20K pieces of... (2 Replies)
I'm trying to understand if it's possible to create a set of variables that are numbered based on another variable (using eval) in a loop, and then call on it before the loop ends.
As an example I've written a script called question (The fist command is to show what is the contents of the... (2 Replies)
Hi Im running this script, which is supposed to find the max value build some tables and then stop running once all the tables are built. Thing is , it keeps assigning a null value to $h and then $g is null so it keep building tables i.e. testupdateNUL. How can I stop this? Here is what I have:
... (4 Replies)
Hi all
Sorry for the basic question, but i am writing a shell script to get around a slightly flaky binary that ships with one of our servers. This particular utility randomly generates the correct information and could work first time or may work on the 12th or 100th attempt etc !.... (4 Replies)
Hi,
hope I am posting in the right section.
My problem is that I have 2 or more arguments passed and I want to check if the arguments passed exists or not.
The first argument should not exist and the remaining others should exist.
example:
./shells.sh argument1 argument2 argument3
... (5 Replies)
Hi, I was debating if I should put this in the dummies or scripts section, I apologize in advance if I chose poorly.
Fairly new to Unix and BASH scripting but I thought I made it fairly well given my limited understanding. However, the output indicates that it's looping and I'm ending up with a... (5 Replies)
Hello All,
Maybe I'm Missing something here but I have NOOO idea what the heck is going on with this....?
I have a Variable that contains a PATTERN of what I'm considering "Illegal Characters". So what I'm doing is looping
through a string containing some of these "Illegal Characters". Now... (5 Replies)
Hi,
I want to read file multiple times. Right now i am using while loop but that is not working.
ex.
While read line
do
while read line2
do
echo stmt1
#processing some data based on data.,
done < file2.txt
done < file1.txt # This will have 10... (4 Replies)
Hi all,
i developed a script to measure the uptime of a process in a Solaris 10/11 environments.
All is well, but i came across a situation where there are multiple processes of the same name. Basically i have the following result file:
beVWARS 13357 19592122
beVWARS 14329 19591910... (4 Replies)
Discussion started by: nms
4 Replies
LEARN ABOUT CENTOS
pam_console
pam_console(8) System Administrator's Manual pam_console(8)NAME
pam_console - determine user owning the system console
SYNOPSIS
session optional pam_console.so
auth required pam_console.so
DESCRIPTION
pam_console.so is designed to give users at the physical console (virtual terminals and local xdm-managed X sessions by default, but that
is configurable) capabilities that they would not otherwise have, and to take those capabilities away when the are no longer logged in at
the console. It provides two main kinds of capabilities: file permissions and authentication.
When a user logs in at the console and no other user is currently logged in at the console, pam_console.so will run handler programs speci-
fied in the file /etc/security/console.handlers such as pam_console_apply which changes permissions and ownership of files as described in
the file /etc/security/console.perms. That user may then log in on other terminals that are considered part of the console, and as long as
the user is still logged in at any one of those terminals, that user will own those devices. When the user logs out of the last terminal,
the console may be taken by the next user to log in. Other users who have logged in at the console during the time that the first user was
logged in will not be given ownership of the devices unless they log in on one of the terminals; having done so on any one terminal, the
next user will own those devices until he or she has logged out of every terminal that is part of the physical console. Then the race can
start for the next user. In practice, this is not a problem; the physical console is not generally in use by many people at the same time,
and pam_console.so just tries to do the right thing in weird cases.
When an application attempts to authenticate the user and this user is already logged in at the console, pam_console.so checks whether
there is a file in /etc/security/console.apps/ directory with the same name as the application servicename, and if such a file exists,
authentication succeeds. This way pam_console may be utilized to run some system applications (reboots, config tools) without root pass-
word, or to enter user password on the first system login only.
ARGUMENTS
debug turns on debugging
allow_nonroot_tty
gain console locks and change permissions even if the TTY's owner is not root.
handlersfile=filename
tells pam_console.so to get the list of the handlers from a different file than /etc/security/console.handlers
EXAMPLE
/etc/pam.d/some-system-tool:
auth sufficient pam_rootok.so
auth required pam_console.so
/etc/pam.d/some-login-service:
auth sufficient pam_console.so
auth required pam_unix.so
session required pam_unix.so
session optional pam_console.so
FILES
/var/run/console/
/var/run/console/console.lock
/etc/security/console.apps
/etc/security/console.handlers
SECURITY NOTES
When pam_console "auth" is used for login services which provide possibility of remote login, it is necessary to make sure the application
correctly sets PAM_RHOST variable, or to deny remote logins completely. Currently, /bin/login (invoked from telnetd) and gdm is OK, others
may be not.
SEE ALSO console.perms(5)console.apps(5)console.handlers(5)pam_console_apply(8)
/usr/share/doc/pam*/html/index.html
BUGS
Let's hope not, but if you find any, please report them via the "Bug Track" link at http://bugzilla.redhat.com/bugzilla/
AUTHORS
Michael K. Johnson <johnsonm@redhat.com>
Support of console.handlers and other improvements by Tomas Mraz <tmraz@redhat.com>
Red Hat 2005/10/4 pam_console(8)