Hello everyone,
I need to make a OS full backup. I am using the vdump command but first, I must to switch to the single-user mode.
I am working on a Compaq Tru64 Unix V4.0G.
Please, could somebody tell me which is/are the commands to do it?
I appreciate your help
Gastón (1 Reply)
I am writing a script that has some tasks that must be run as root, then set of tasks to be run as normal user, then again as root.
is there a way to switch between users in a script?
any other alternatives?
thx (3 Replies)
Running the following shell script,
#!/usr/bin/ksh
set -x
swdofile=/opt/SWDO_IN1V01P001_1.csv
USER='myusername'
PASSWD='mypassword'
HOST='myhostname'
ftp -n $HOST << SCRIPT
quote USER $USER
quote PASS $PASSWD
su - BRA -c put $swdofile
quit
SCRIPT
exit 0
but not managing to get the... (1 Reply)
Good day Guys!!!
I am currently making a script in AIX, the script runs a SAS job, the owner of the script is the root, but the SAS jobs cannot be run by the root, as it should be run by a user 'sasia'. But inside the script, root creates a logfile, so what I need is just to su to sasia for the... (3 Replies)
Hi,
I have a shell script in which I need to switch to another user and execute some commands and then come back to the original user.
To make it more clear -
I have to log in as user root then 'su' to jag - execute a script called backup.sh and then logout and come back to root again..
... (1 Reply)
Hi,
what is the use of the double quotes and !! in the following code segment:
su - user1 << ""!! > /dev/null 2>&1
echo "welcome user1"
EOF
!!
also what is the difference between below:
su - user1 << ""!! > /dev/null 2>&1 and
su - $USER << ""!!!> /dev/null 2>&1.
Note: $USER =... (1 Reply)
Hi,
what is the use of the double quotes and !! in the following code segment:
su - user1 << ""!! > /dev/null 2>&1
echo "welcome user1"
EOF
!!
also what is the difference between below:
su - user1 << ""!! > /dev/null 2>&1 and
su - $USER << ""!!!> /dev/null 2>&1.
Note: $USER =... (2 Replies)
I need to do a switch user in an automated mode and do a ftp using that switched id.
Scenario:
initial login xx.
switch to user-yy without manually entering the password.
ftp some files from user yy to another user zz - automated mode.
Can any unix experts can help me for my above query? (1 Reply)
I need to do a switch user in an automated mode and do a ftp using that switched id.
Scenario:
initial login xx.
switch to user-yy without manually entering the password.
ftp some files from user yy to another user zz - automated mode.
Can any unix experts can help me for my above query? (9 Replies)
Whenever i switch from root to another user, by doing su - user, it takes me to home directory of user. This is very annoying as i want to be in same dir to run different commands as root sometimes and sometimes as normal user.
How to fix this? (1 Reply)
Discussion started by: syncmaster
1 Replies
LEARN ABOUT CENTOS
pam_debug
PAM_DEBUG(8) Linux-PAM Manual PAM_DEBUG(8)NAME
pam_debug - PAM module to debug the PAM stack
SYNOPSIS
pam_debug.so [auth=value] [cred=value] [acct=value] [prechauthtok=value] [chauthtok=value] [auth=value] [open_session=value]
[close_session=value]
DESCRIPTION
The pam_debug PAM module is intended as a debugging aide for determining how the PAM stack is operating. This module returns what its
module arguments tell it to return.
OPTIONS
auth=value
The pam_sm_authenticate(3) function will return value.
cred=value
The pam_sm_setcred(3) function will return value.
acct=value
The pam_sm_acct_mgmt(3) function will return value.
prechauthtok=value
The pam_sm_chauthtok(3) function will return value if the PAM_PRELIM_CHECK flag is set.
chauthtok=value
The pam_sm_chauthtok(3) function will return value if the PAM_PRELIM_CHECK flag is not set.
open_session=value
The pam_sm_open_session(3) function will return value.
close_session=value
The pam_sm_close_session(3) function will return value.
Where value can be one of: success, open_err, symbol_err, service_err, system_err, buf_err, perm_denied, auth_err, cred_insufficient,
authinfo_unavail, user_unknown, maxtries, new_authtok_reqd, acct_expired, session_err, cred_unavail, cred_expired, cred_err,
no_module_data, conv_err, authtok_err, authtok_recover_err, authtok_lock_busy, authtok_disable_aging, try_again, ignore, abort,
authtok_expired, module_unknown, bad_item, conv_again, incomplete.
MODULE TYPES PROVIDED
All module types (auth, account, password and session) are provided.
RETURN VALUES
PAM_SUCCESS
Default return code if no other value was specified, else specified return value.
EXAMPLES
auth requisite pam_permit.so
auth [success=2 default=ok] pam_debug.so auth=perm_denied cred=success
auth [default=reset] pam_debug.so auth=success cred=perm_denied
auth [success=done default=die] pam_debug.so
auth optional pam_debug.so auth=perm_denied cred=perm_denied
auth sufficient pam_debug.so auth=success cred=success
SEE ALSO pam.conf(5), pam.d(5), pam(8)AUTHOR
pam_debug was written by Andrew G. Morgan <morgan@kernel.org>.
Linux-PAM Manual 09/19/2013 PAM_DEBUG(8)