If your main goal is to have users switch to account ABC, then users can switch to ABC directly (without becoming root first) using:
They will be prompted for the passowrd of ABC before the sytem lets them switch to ABC.
This will prevent you from having to give the root password to ordinary users.
Is is possible switch user from a non-root user to root user without entering the password interactively inside a korn shell script which is run by a non-root user?
e.g. I have a non-root user called infodba who is in dba group and I want to create a shell script which is executed by infodba... (5 Replies)
Hi
I have written a script to switch user and do some operations. I used expect command it doesn't work. It switches the user and waits for the Password to be entered manually. Also, i tried to fetch the pasword from passwd file, it didn't work.The script is as below:
... (4 Replies)
Hi,
I have to switch to a different user and execute certain commands and then come back to the original user
Ex: My id is 'usstage'. I need to switch to 'apstage', souce a script there, execute a function and then get back again to usstage.
Please note that I do not have expect installed... (4 Replies)
Hi Experts,
I'm trying to write a shell script to stop few things where i have to use another user to execute a command. Otherwise it will not work.
Your help is really appreciated
Thanks, (16 Replies)
I want to switch as another user without using password .Is it posiible ? I have one server B and I have logged in as username u1 but I want to login to that same server using username as u2 but I don't want to give the password for u2. (3 Replies)
Hi Gurus,
I have a script that requires me to switch from local user to root. Anyone who has an idea on this since when i switch user to root it requires me to input root password.
It seems that i need to use expect module here, but i don't know how to create the object for this.
... (1 Reply)
Usually in solaris/Linux servers , when you do an su - username (space before and after the hyphen) the user's .profile should get sourced. But in the below linux machine it is not. As you see below ORACLE_HOME variable is not being set.
# uname -a
Linux revaltb214 2.6.18-238.el5 #1 SMP Sun... (7 Replies)
Hello All,
Here I am trying to login a Linux machine as admin user from a Solaris box..
& then switch to root user..
Code I use:
ssh admin@<IP> << END
su - root << A
echo "Hello I am logged in as root"
exit
A
exit
END
But the error I get..
su: must be run from a... (3 Replies)
Hi,
I need to switch from local user to root user in a shell script.
I need to make it automated so that it doesn't prompt for the root password.
I heard the su command will do that work but it prompt for the password.
and also can someone tell me whether su command spawns a new shell or... (1 Reply)
HI
in a server we can't login with root user directly but i can login with different user and then i can switch to root user by su command
Requirement
is there anyway where i can write a script without mentioning password in file as mentioning the root password is not the... (3 Replies)
Discussion started by: scriptor
3 Replies
LEARN ABOUT XFREE86
fs_lsmount
FS_LSMOUNT(1) AFS Command Reference FS_LSMOUNT(1)NAME
fs_lsmount - Reports the volume for which a directory is the mount point.
SYNOPSIS
fs lsmount -dir <directory>+ [-help]
fs ls -d <directory>+ [-h]
DESCRIPTION
The fs lsmount command reports the volume for which each specified directory is a mount point, or indicates with an error message that a
directory is not a mount point or is not in AFS.
To create a mount point, use the fs mkmount command. To remove one, use the fs rmmount command.
OPTIONS-dir <directory>+
Names the directory that serves as a mount point for a volume. The last element in the pathname provided must be an actual name, not a
shorthand notation such as one or two periods ("." or "..").
-help
Prints the online help for this command. All other valid options are ignored.
OUTPUT
If the specified directory is a mount point, the output is of the following form:
'<directory>' is a mount point for volume '<volume name>'
where
o A number sign ("#") precedes the <volume name> string for a regular mount point.
o A percent sign ("%") precedes the <volume name> string for a read/write mount point.
o A cell name and colon (":") follow the number or percent sign and precede the <volume name> string for a cellular mount point.
The fs mkmount reference page explains how the Cache Manager interprets each of the three types of mount points.
If the directory is a symbolic link to a mount point, the output is of the form:
'<directory>' is a symbolic link, leading to a mount point for volume
'<volume name>'
If the directory is not a mount point or is not in AFS, the output reads:
'<directory>' is not a mount point.
If the output is garbled, it is possible that the mount point has become corrupted in the local AFS client cache. Use the fs flushmount
command to discard it, which forces the Cache Manager to refetch the mount point.
EXAMPLES
The following example shows the mount point for the home directory of user "smith":
% fs lsmount /afs/abc.com/usr/smith
'/afs/abc.com/usr/smith' is a mount point for volume '#user.smith'
The following example shows both the regular and read/write mount points for the ABC Corporation cell's "root.cell" volume.
% fs lsmount /afs/abc.com
'/afs/abc.com' is a mount point for volume '#root.cell'
% fs lsmount /afs/.abc.com
'/afs/.abc.com' is a mount point for volume '%root.cell'
The following example shows a cellular mount point: the State University cell's "root.cell" volume as mounted in the ABC Corporation cell's
tree.
% fs lsmount /afs/stateu.edu
'/afs/stateu.edu' is a mount point for volume '#stateu.edu:root.cell'
PRIVILEGE REQUIRED
The issuer must have the "l" (lookup) permission on the ACL of the root directory of the volume that houses the file or directory named by
the -dir argument, and on the ACL of each directory that precedes it in the pathname.
SEE ALSOfs_flushmount(1), fs_mkmount(1), fs_rmmount(1)COPYRIGHT
IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved.
This documentation is covered by the IBM Public License Version 1.0. It was converted from HTML to POD by software written by Chas
Williams and Russ Allbery, based on work by Alf Wachsmann and Elizabeth Cassell.
OpenAFS 2012-03-26 FS_LSMOUNT(1)