John, I like having 3 separate messages. Perhaps you could add an introduction such as echo "Your group is currently \"mkpasswd\". This indicates that .."
The first two cases should never occur, except in rare cases of postinstall screw up or if the files get deleted somehow. The last case is the norm for domain users. It is correct that the message can be safely ignored. Just a thought: you could consider displaying it only once, e.g. by sed'ing /etc/group to change mkgroup_l_d to mkgroup-l-d. Neither /etc/passwd nor /etc/group are complete (because the primary domain controller is not contacted during postinstall). So the message should advise but not mandate to rebuild both. echo "The /etc/passwd and /etc/group files should be completed." echo "See the man pages .. Pierre "Morrison, John" wrote: > > Hi all, > > Igor and I have been having a chat about the warning/error messages > which appear when there's something wrong with /etc/[passwd|group]. > > Here's what we are considering so far... > > case "`id -ng`" in > mkpasswd ) > echo "The /etc/passwd (and possibly /etc/group) files need to be > rebuilt." > echo "See the man pages for mkpasswd and mkgroup then, for example, > run" > echo "mkpasswd -l [-d] > /etc/passwd" > echo "mkgroup -l [-d] > /etc/group" > echo "as appropriate. Note that the -d switch is necessary for" > echo "domain users." > ;; > mkgroup ) > echo "The /etc/group (and possibly /etc/passwd) files need to be > rebuilt." echo "See the man pages for mkpasswd and mkgroup then, > for example, run" echo "mkpasswd -l [-d] > /etc/passwd" > echo "mkgroup -l [-d] > /etc/group" > echo "as appropriate. Note that the -d switch is necessary for" > echo "domain users." ;; > mkgroup_l_d ) > echo "The /etc/group file doesn't contain the domain groups." > echo "See the man page for mkgroup and then, for example, run" > echo "mkgroup -l -d > /etc/group" > echo "as appropriate." > echo > echo "You can safely ignore this message" > echo "To stop it displaying, please edit /etc/profile" > ;; > esac > > but neither of us is 100% sure this is correct, Pierre, Corinna, > [anyone else ;) ] any comments/opinions?... > > J. > > ========================================================================== > Information in this email and any attachments are confidential, and may > not be copied or used by anyone other than the addressee, nor disclosed > to any third party without our permission. There is no intention to > create any legally binding contract or other binding commitment through > the use of this electronic communication unless it is issued in accordance > with the Experian Limited standard terms and conditions of purchase or > other express written agreement between Experian Limited and the recipient > Experian Limited (registration number 653331) > Registered office: Talbot House, Talbot Street, Nottingham NG1 5HF