~xnox/ubuntu/quantal/shadow/clear-locks

« back to all changes in this revision

Viewing changes to debian/shadowconfig.sh

  • Committer: Bazaar Package Importer
  • Author(s): Nicolas Valcárcel Scerpella (Canonical)
  • Date: 2009-11-07 04:55:18 UTC
  • mfrom: (1.1.8 upstream) (18.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20091107045518-qqclg1lhinz6zv1i
Tags: 1:4.1.4.2-1ubuntu1
* Merged with debian unstable. Remaning changes (LP: #477299):
  - Ubuntu specific:
    + debian/login.defs: use SHA512 by default for password crypt routine.
  - debian/patches/495_stdout-encrypted-password: chpasswd can report
    password hashes on stdout (Debian bug 505640).
  - Rework 495_stdout-encrypted-password to cope with chpasswd using PAM.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
set -e
5
5
 
6
6
shadowon () {
7
 
bash<<- EOF
8
7
    set -e
9
8
    pwck -q
10
9
    grpck -p
11
10
    pwconv
12
11
    grpconv
13
 
    cd /etc
14
 
    chown root:root passwd group
15
 
    chmod 644 passwd group
16
 
    chown root:shadow shadow gshadow
17
 
    chmod 640 shadow gshadow
18
 
EOF
 
12
    chown root:root /etc/passwd /etc/group
 
13
    chmod 644 /etc/passwd /etc/group
 
14
    chown root:shadow /etc/shadow /etc/gshadow
 
15
    chmod 640 /etc/shadow /etc/gshadow
19
16
}
20
17
 
21
18
shadowoff () {
22
 
bash<<- EOF
23
19
    set -e
24
20
    pwck -q
25
21
    grpck -p
26
22
    pwunconv
27
23
    grpunconv
28
 
    cd /etc
29
24
    # sometimes the passwd perms get munged
30
 
    chown root:root passwd group
31
 
    chmod 644 passwd group
32
 
EOF
 
25
    chown root:root /etc/passwd /etc/group
 
26
    chmod 644 /etc/passwd /etc/group
33
27
}
34
28
 
35
29
case "$1" in