Quote:
Originally Posted by fazal.jaddi
Hello Wpeckham - Nice sense of humour, but it actually stands for Functional ID with special permission.
So let me explain you, what exactly i am looking for, In our env we are having 100's of server and each server having its own FID for which i need to search it manually and log in using those credentials so i want to create a script where i can store the credentials and call them whenever needed.
thanks
|
I am in agreement with the other posts. FID is something local that you (or your company, class, or group) has defined that is NOT standard and that no one else in the world can be expected to understand. I take it that it is simply the User ID that is used to run a particular process or suite of processes for some specific function (like the www family of UIDs for httpd).
The local case:
System scripts generally run as root and use lines like
Code:
su - <user> -c "command and parameters"
lines, see th su man page. If you want something to WORK like that but without needing root access, again I recommend sudo. Sudo can be sert up for one user to run specific commands or processes as another user with or WITHOUT requiring a password! If the password is required, it will be the password of the CALLING user, not the TARGET user.
Please check the SUDO man pages, but you will find better information (howto documents, etc.) online using Google. If you do not, please mention that here and we can point you to some specific pages.
The remote case:
Check ssh and putty (and putty-tools). It is easy to look up the credentials for a box ONE time and use them (and ssh-copy-id) to replicate your public ssh key to the remote ssh authorized_keys files so that logon is key authenticated without password. Using something like mpssh you can even remote execute a command over all (or some named subset) of all of the known hosts.
NONE of these solutions require a password embedded in a script and they are likely to be more secure than any scripted solution. Also, they are supported and work better and faster, and do not involve reinventing the horse.