How to maintain a personal password file 'safely'?


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users How to maintain a personal password file 'safely'?
# 1  
Old 04-09-2015
How to maintain a personal password file 'safely'?

Hi all,

As time progresses, the number of servers that I have to login to has grown to the hundreds.

Some of the servers has NIS so I can use one single password for this group of servers.

The hard part comes to when you have 20+ other servers that now require different passwords and different password rules. In this scenario, I am wondering whether anyone from this FORUM has a 'simple' way of being able to copy and paste passwords from an encrypted file when prompted instead of having to type it in.

At the moment, I am using Keepass, then I copy-and-paste the passwords from it into a text file that I crypt/decrypt and then delete after. I do this every so often that it is becoming tedious that I just keep the file and then crypt it to decrypt again at some stage Smilie-

Any advice will be much appreciated. Thanks.
# 2  
Old 04-09-2015
How are you logging into these servers? ssh? I'm sure you've heard of ssh keys for passwordless login.

It of course presents a new problem, how to keep the key safe? You can put a password on the key, which makes it useless to steal, but then how does that help automatic logins?

ssh-agent allows you to type in a password once, to load the key and keep it resident for logging into remote hosts. I type the key password in once when I login in the morning to get passwordless access to my hosts all day. The agent quits when I logout.
This User Gave Thanks to Corona688 For This Post:
# 3  
Old 04-10-2015
Hi,

Yes, I use ssh but then I do a sudo su - <login>, for example sudo su - oracle, which I then have to supply my password yet again Smilie-

So in a way the passwordless stuff works on the first instance but not when I then need to do a sudo or is there a way that I can sudo su - where I won't be prompt for the password.

If there are sudo config settings to change, I can't do it as I am not the SA of the server Smilie
# 4  
Old 04-10-2015
There is a choice of policy when setting up sudo rules. If your company has chosen to enforce passwords, (perhaps with an expiry time) then that is why you have the prompt coming up.

You would need to negotiate to get the policy changed, however the counter argument will be that if someone gets access to your session, then they can run privileged commands without verification.



Robin
# 5  
Old 04-10-2015
Why not do ssh oracle@host instead of ssh username@host sudo su - oracle ?

Bottom line, if they're not willing to give you passwordless access to oracle, there's not really any effective, secure way to streamline that.

Last edited by Corona688; 04-10-2015 at 01:02 PM..
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Removing special chars from file and maintain field separator

Running SunOs 5.6. Solaris. I've been able to remove all special characters from a fixed length file which appear in the first column but as a result all subsequent columns have shifted to the left by the amount of characters deleted. It is a space separated file. Line 1 in input file is... (6 Replies)
Discussion started by: iffy290
6 Replies

2. Solaris

need to safely reboot to cdrom

I am using: reboot -- cdrom However I'm afraid of causing file system errors/corruption. I've seen many threads say that init 6 is safer, but I need to get to CDROM. Is there a command that is as safe as init, but can boot to cdrom, or should I not worry so much about the reboot... (5 Replies)
Discussion started by: lcoreyl
5 Replies

3. Shell Programming and Scripting

Maintain health of passwd file

Hello guys I am about to write a script that is based on "The Linux Administration Handbook" The exercise is as follows: Write a shell script to help monitor the health of the /etc/passwd file. Find entries that have UID0 Find entries that have no password (needs /etc/shadow) Find any... (4 Replies)
Discussion started by: Learn4Life
4 Replies

4. Homework & Coursework Questions

Maintain health of passwd file

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Hello guys I am about to write a script that is based on "The Linux Administration Handbook" The exercise is... (6 Replies)
Discussion started by: Learn4Life
6 Replies

5. Shell Programming and Scripting

Safely parsing parameters

I have a string like root=/dev/sda3 noacpi foo "Baz mumble" which I would like to separate into tokens like a shell does. This would be easily done with eval but that would open a security hole big enough to drop a cow through, injecting arbitrary code would be easy as pie. How can I parse this... (15 Replies)
Discussion started by: Corona688
15 Replies

6. Shell Programming and Scripting

Script to maintain file versions

I am developing a script to maintain 'n' number of versions of a file. The script will take a filename as a parameter and the number of versions to maintain. This basically does something like a FIFO. Here is what I developed. But something is not right. I have attached the script. Can u pls help... (2 Replies)
Discussion started by: vskr72
2 Replies

7. Shell Programming and Scripting

How to safely rm/mv files/directory

Hi all, Am writing a script that does a rm/mv if a file exist, however, in one scenario, one of the variables which is supposed to a variable for a directory is undefined/blank so instead of the variable resolving to /tmp/logfile.dmp, it resolves instead to / so the rm translates to a rm /... (2 Replies)
Discussion started by: newbie_01
2 Replies

8. UNIX for Dummies Questions & Answers

sed a file and maintain date stamp and permissions

I need to alter a file. I'm using sed then passing output to temp file then using touch -r to maintain the date but the permissions do not get preserved How can I sed a file and maintain date and permissions currently it's preserving the date but the permissions revert back to the... (3 Replies)
Discussion started by: andyatit
3 Replies
Login or Register to Ask a Question