Re: [BackupPC-users] http access
2008-08-20 12:43:12
> If I grep the usernames from passwd file how do I add the password?
> >From what I see, the content of (for the same user/passwd combination)
> /etc/shadow is quite different from the one in /etc/backuppc/htpasswd.
In my installation I look at /etc/httpd/conf.d/BackupPC.conf and I see :
AuthUserFile /etc/BackupPC/apache.users
Which means that I have to add the username and password to that file.
So you just need to extract the username and password fields from /etc/shadow
On my box that is the 1st and 2nd fields.
Here's a little script I wrote for mine, which takes them out of our
NIS database. But just change that line to grep right out of your
shadow password file and you should be OK
#!/bin/bash
PWFILE=/usr/share/BackupPC/apache.users
MYUSERS="user1 user2 user3"
for myuser in $MYUSERS
do
/usr/bin/ypcat passwd | grep ^${myuser}: | awk -F: '{print $1":"$2}'
done > $PWFILE
--
"I destroy my enemies when I make them my friends"
- Abraham Lincoln
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
BackupPC-users mailing list
BackupPC-users AT lists.sourceforge DOT net
List: https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki: http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/
|
|
|