krypted October 24th, 2016
ID Site Contact Address City Zip Country SignupDate 1 Krypted Charles Edge my house Minneapolis 55418 US 2005-01-01 2 Apple Tim Cook spaceship Cupertino 95014 US 2015-12-05 3 Microsoft Satya Nadella campus Redmond 98053 US 2014-11-01 4 Facebook Mark Zuckerberg foodhall Menlo Park 94025 US 2010-03-10 5 JAMF Dean Hager Grain Exchange Minneapolis 55418 US 2016-01-01Next, we’ll create a view called SignupDate that only has customers that signed up on January 1st of 2005. This view returns the data set of contacts and signup dates:
CREATE VIEW signupdate AS SELECT * FROM Customers WHERE OrderDate='2005-01-01';The syntax is similar to a SELECT, but with CREATE VIEW followed by the name of the view and then AS followed by the SELECT statement. The view is a virtual table containing the output of the query rather than data. Once created, use use the signupdate view in a query:
SELECT * FROM signupdate;This SQL statement returns the following results:
1 Krypted Charles Edge my house Minneapolis 55418 US 2005-01-01You can also use the view to contain a query with just the columns you want, according to how you structure your query, thus granting access to specific columns, without granting access to all of the columns in a table.
krypted March 14th, 2016
Posted In: SQL
krypted October 18th, 2014
serveradmin settings afp:maxConnections = 500The second setting to mention is greetings. The default is to send a greeting each time a user connects if one is enabled. I find that just sending the greeting once satisfies the policy most environments would have around such things. I’ve also found that enough environments setup greetings that I’ve had to do this enough times that it’s fresh in my memory. Therefore, to configure, use Server.app to setup a greeting and then run the following command:
serveradmin settings afp:sendGreetingOnce = yesAnother thing that many environments are going to want is activity logs. By default these are disabled. To enable:
serveradmin settings afp:activityLog = yesAnd the setting for how frequently to roll those activity logs is gone from the GUI as well. To edit that (let’s just set it to 2 weeks instead of the default of 1 week):
serveradmin settings afp:activityLogTime = 14The checkboxes for each type of activity to log are gone, so to access each (by default these are all enabled, so enabling the activity log turns them all on, therefore we’ll just disable here, even though as it seems the server team is well aware of, if you use one most use all:
serveradmin settings afp:loggingAttributes:logOpenFork = no serveradmin settings afp:loggingAttributes:logCreateDir = no serveradmin settings afp:loggingAttributes:logLogin = no serveradmin settings afp:loggingAttributes:logLogout = no serveradmin settings afp:loggingAttributes:logDelete = no serveradmin settings afp:loggingAttributes:logCreateFile = noNote: Activity logs are still by IP address rather than userID Error logs don’t roll (setting of 0), so to set them to do so (again using 14):
serveradmin settings afp:errorLogTime = 14The disconnect idle users option is also now gone. To enable it:
serveradmin settings afp:idleDisconnectOnOff = yesThis doesn’t edit the tickle time, but then, that was never presented in the GUI anyway (it controls how frequently a client who’s connected via afp checks into the server). To customize the disconnect message:
serveradmin settings afp:idleDisconnectMsg = "Did you fall asleep there bub?"And of course, you might need to customize the number of hours before a user is considered idle:
serveradmin settings afp:idleDisconnectTime = 1To globally disable guest access:
serveradmin settings afp:guestAccess = noAnd to allow the root user to log into afp:
serveradmin settings afp:allowRootLogin = yesFinally, to access the masquerade as a user option for administrative accounts, which I’m not sure I like, but which some do:
serveradmin settings afp:attemptAdminAuth = yes
krypted June 9th, 2012
Tags: admin, administrator, AFP, afp settings, diradmin, enable activity log, first attempt, first connection only, lion server, login greeting, logs, Mac OS X Server, masquerade as admin user, missing afp settings, os x lion server, server.app, serveradmin settings afp, set time out, SMB
cliq getLocalVolumesTo put all of these together, let’s look at an example where the storage node has an IP address of 192.168.100.100, an administrative user name of admin and an administrative password of ADMINPASSWORD. For this storage node we have a volume that we have created called MYSHAREDVOLUME and want to use a password of PASSWORDFORLUN to access it.
cliq assignVolumeChap volumeName=MYSHAREDVOLUME targetSecret=PASSWORDFORLUN login=192.168.100.100 userName=admin passWord=ADMINPASSWORDSome other important verbs we’ve had to use are createCluster, connectVolume, configureRaid, createRemoteSnapshot (which is good to do before making any changes btw) and of course, createVolume (which you would need to do before assigning authentication to the volume). Each item that has a create typically has an associated delete (eg – deleteVolume, deleteRaid, etc) and an associated modify (eg – modifyVolume, modifyRaid, etc), which can be used to remove the added item and edit it (respectively). Overall, there are a lot of verbs that can be used with cliq, making it a somewhat robust scripting interface if you need to automate events. Another verb I find that I use a lot when I’m first setting up a device is the getPerformanceStats verb, which has a single option in interval, the number of milliseconds between sampling the performance statistics.
krypted May 5th, 2010
fsck -fyThen mount the file system:
mount -uw /Then reset the password using the passed command
passwd <username>For example, if the user is root:
passwd rootWhen prompted, provide the desired administrative password.
krypted February 22nd, 2005