Solaris config files syntax | Unix Linux Forums | Solaris

  Go Back    


Solaris The Solaris Operating System, usually known simply as Solaris, is a Unix-based operating system introduced by Sun Microsystems. The Solaris OS is now owned by Oracle.

Solaris config files syntax

Solaris


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 07-15-2011
jclarkaz jclarkaz is offline
Registered User
 
Join Date: Jul 2011
Last Activity: 15 July 2011, 4:33 PM EDT
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Power Solaris config files syntax

I have recently been told that on a Solaris 10 system # means default settings, and that ## indicates a comment.

Therefore, the following setting in the
etc/default/login file

#RETRIES=5

indicates that the number of failed login attempts allowed is 5.

Is this true or false? Should the # be removed to enable the setting?
Sponsored Links
    #2  
Old 07-16-2011
jlliagre jlliagre is offline Forum Advisor  
ɹǝsn sıɹɐlos
 
Join Date: Dec 2007
Last Activity: 23 July 2014, 9:45 PM EDT
Location: Paris
Posts: 4,395
Thanks: 15
Thanked 460 Times in 416 Posts
There is no such convention. However, it is true in some configuration files like the one you refer to, the default values are commented out. There is no requirement to explicitly set a parameter to its default value so you can leave RETRIES as it is, that will have the same effect than uncommenting the line.
Sponsored Links
    #3  
Old 07-16-2011
Smiling Dragon's Avatar
Smiling Dragon Smiling Dragon is offline Forum Advisor  
Disorganised User
 
Join Date: Nov 2007
Last Activity: 17 June 2014, 10:55 PM EDT
Location: New Zealand
Posts: 1,035
Thanks: 20
Thanked 23 Times in 22 Posts
It's also worth remembering that someone else could have edited this value, then later commented it out
    #4  
Old 07-16-2011
fpmurphy's Avatar
fpmurphy fpmurphy is offline Forum Staff  
who?
 
Join Date: Dec 2003
Last Activity: 22 July 2014, 12:11 AM EDT
Location: /dev/ph
Posts: 4,770
Thanks: 59
Thanked 422 Times in 391 Posts
I have seen that convention used in a number of places but mostly on Linux systems. One place where I came across that convention recently was the preseed file for syslinux.

Can you point us at any Solaris configuration files that appear to use that convention?
Sponsored Links
    #5  
Old 07-16-2011
jlliagre jlliagre is offline Forum Advisor  
ɹǝsn sıɹɐlos
 
Join Date: Dec 2007
Last Activity: 23 July 2014, 9:45 PM EDT
Location: Paris
Posts: 4,395
Thanks: 15
Thanked 460 Times in 416 Posts
Quote:
Originally Posted by Smiling Dragon View Post
It's also worth remembering that someone else could have edited this value, then later commented it out
That's true but in this particular case, the comments explaining the RETRIES setting usage are quite explicit:

Code:
(from OpenSolaris /etc/default/login file)
# RETRIES determines the number of failed logins that will be
# allowed before login exits. Default is 5 and maximum is 15.
# If account locking is configured (user_attr(4)/policy.conf(4))
# for a local user's account (passwd(4)/shadow(4)), that account
# will be locked if failed logins equals or exceeds RETRIES.
#
#RETRIES=5

Note also that the "##" convention the OP is talking about isn't used in that file.
Sponsored Links
    #6  
Old 07-17-2011
Smiling Dragon's Avatar
Smiling Dragon Smiling Dragon is offline Forum Advisor  
Disorganised User
 
Join Date: Nov 2007
Last Activity: 17 June 2014, 10:55 PM EDT
Location: New Zealand
Posts: 1,035
Thanks: 20
Thanked 23 Times in 22 Posts
Quote:
Originally Posted by jlliagre View Post
That's true but in this particular case, the comments explaining the RETRIES setting usage are quite explicit:

Code:
(from OpenSolaris /etc/default/login file)
# RETRIES determines the number of failed logins that will be
# allowed before login exits. Default is 5 and maximum is 15.
# If account locking is configured (user_attr(4)/policy.conf(4))
# for a local user's account (passwd(4)/shadow(4)), that account
# will be locked if failed logins equals or exceeds RETRIES.
#
#RETRIES=5

Note also that the "##" convention the OP is talking about isn't used in that file.
Ah, what I was getting at is that sometimes an admin comes along and uncomments RETRIES, sets it to what they want and goes away, then comes back later (or someone else does) and comments it out to return it to default, now the "#RETRIES=some number" is just what it was last set to rather than the default.
Shared systems and all, I become rather paranoid

But also, your emboldened bit above is about the only "standard" I ever use - if the default is explicitly named in the comments or man, it's a fair bet that you can assume that's the default. Otherwise, don't expect a standard

(Half answering jlliagre as to what I was rambling on about, half answering the OP with more info)
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Shell script that will compare two config files and produce 2 outputs 1)actual config file 2)report muraliinfy04 Shell Programming and Scripting 4 11-04-2010 07:30 AM
How to migrate Solaris 10 CDE config to HP-UX CDE. binary0x01 UNIX Desktop for Dummies Questions & Answers 0 08-16-2010 06:55 PM
parsing config file to create new config files clazzic Shell Programming and Scripting 1 12-27-2009 02:06 PM
Samba config file syntax AWSeeker UNIX for Advanced & Expert Users 1 03-09-2009 07:02 AM
Printer Config for Solaris 5.9 efunds Solaris 0 07-28-2008 01:56 AM



All times are GMT -4. The time now is 11:20 AM.