LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   Subversion configuration issue (http://www.linuxquestions.org/questions/linux-general-1/subversion-configuration-issue-880241/)

anand.nande 05-12-2011 02:09 AM

I have SVN clients that use multiple username/password combinations for different tasks against the same repo.

I'd like to have the client cache one username/password pair (a shared read-only account) and not cache other username/password pairs (individual accounts with write access).

I know how to turn it on and off globally. That's not what we want.

Authentication is LDAP (Active Directory) + APACHE + WebDAV SVN

ADDITION AS AT 13:21
After doing a bit of research and implementing your case in my lab, I came to the following conclusion.

The first time the svn command-line client is executed, it creates a per-user configuration area. On Linux systems, this area appears as a directory named '.subversion' in the user's home directory.

example: /root/.subversion

In your case all users who have logged in till now have their passwords cached here. So now to have those "SPECIFIC USERS CREDENTIALS" still cahced in this file - edit the file and remove unwanted user credentials from it.

you will find following files inside .subversion

svn.simple svn.ssl.client-passphrase svn.ssl.server svn.username

Now you will want to remove specific credentials from the disk cache.
To do this, you need to navigate to svn.simple directory and manually delete the appropriate cache file.
Credentials are cached in individual files; if you look inside each file, you will see keys and values.
The svn:realmstring key describes the particular server realm that the file is associated with:

***sample svn.simple file output***

$ ls ~/.subversion/auth/svn.simple/
5671adf2865e267db74f09ba6f872c28
3893ed123b39500bca8a0b382839198e
5c3c22968347b390f349ff340196ed39

$ cat ~/.subversion/auth/svn.simple/5671adf2865e267db74f09ba6f872c28

K 8
username
V 3
joe
K 8
password
V 4
blah
K 15
svn:realmstring
V 45
<https://svn.domain.com:443> Joe's repository
END

Once you have located the proper cache file, just delete it.
(similarly navigate to other directories and delete the unwanted users credentials)

________________________________________
Now to permanently disable caching,
Navigate to .subversion/config file and uncomment the following lines under [auth]

store-passwords = no
store-auth-creds = no

Note:
=====
To disable password caching for a particular one-time command, pass the --no-auth-cache option on the command line.


All times are GMT -5. The time now is 10:49 AM.